Changes between Version 2 and Version 3 of Ticket #3295, comment 6


Ignore:
Timestamp:
06/24/2021 10:36:58 AM (3 years ago)
Author:
mhertz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3295, comment 6

    v2 v3  
    33https://forum.deluge-torrent.org/viewtopic.php?f=9&t=55968&p=233591#p233591 
    44 
    5 "I previously posted a version in other thread, which just unbroke magnet support, but this here is full fix, so no .magnet files labeled .invalid anymore for no reason, is correctly deleted/renamed after adding, and labels work again for them. 
     5"I previously posted a version in other thread, which just unbroke magnet support of dev56 but left the other issues unfixed, but this here is full fix for all deluge2 versions, so no .magnet files labeled .invalid anymore for no reason, is correctly deleted/renamed after adding, and labels work again for them. 
    66 
    7 The issue btw was that add_torrent_magnet() isn't returning a defered object like add_torrent_file_async(), so the scheduled deferred of magnets never ran and error'ed out with attribute-error(as the returned torrent_id string didn't have no addCallback attribute i.e. not a deferred), and disables watchdir. Pre-Cas fix, then on_torrent_added() never called for magnets, and so at next poll-interval would try readd, fail and hence rename .invalid. Anyway, so I changed the call for magnets from a twisted addCallback into instead direct function call, and added the addCallback/addErrback only for torrents and not magnets, making magnets and labels work again." 
     7The issue btw was that add_torrent_magnet() isn't returning a defered object like add_torrent_file_async(), so the scheduled deferred of magnets never ran and error'ed out with attribute-error(as the returned torrent_id string didn't have no addCallback attribute i.e. not a deferred), and disables watchdir. Pre-dev56, then on_torrent_added() never called for magnets, and so at next poll-interval would try readd, fail and hence rename .invalid. Anyway, so I changed the call for magnets from a twisted addCallback into instead direct function call, and added the addCallback/addErrback only for torrents and not magnets, making magnets and labels work again. I reported this to Cas on bugtracker also."