Opened 5 years ago

Closed 3 years ago

#3295 closed bug (Fixed)

autoadd don't apply labels to magnet files

Reported by: American_Jesus Owned by:
Priority: minor Milestone: 2.0.4
Component: Plugin Version: 2.0.3
Keywords: autoadd, magnet Cc:

Description

Using Deluge on docker (linuxserver/deluge), current version: 2.0.3-2201906121747ubuntu18.04.1-ls34

autoadd set only to apply label to new torrent/magnet files (see attach)

.torrent files work without issues with label set, but .magnet files are added but label isn't set

Attachments (3)

autoaddSettings1.png (26.7 KB ) - added by American_Jesus 5 years ago.
autoaddSettings2.png (27.7 KB ) - added by American_Jesus 5 years ago.
autoaddSettings1_fixed.png (39.3 KB ) - added by American_Jesus 5 years ago.

Download all attachments as: .zip

Change History (11)

by American_Jesus, 5 years ago

Attachment: autoaddSettings1.png added

by American_Jesus, 5 years ago

Attachment: autoaddSettings2.png added

by American_Jesus, 5 years ago

Attachment: autoaddSettings1_fixed.png added

comment:1 by American_Jesus, 5 years ago

autoaddSettings1.png settings are cropped, attached autoaddSettings1_fixed.png with full settings windows from GTK client

comment:2 by Calum, 5 years ago

Milestone: needs verified2.0.4

comment:3 by jim-joeny, 5 years ago

I'm experiencing this same issue with Ubuntu 18.04.3 and Fedora 31 with deluged 2.0.3-2-201906121747-ubuntu18.04.1 running as a daemon. I also tried the deluge development build 2.1.1.dev7501. Torrent files work fine but magnet links don't have their labels set and the magnet file gets renamed to .invalid. But the torrent gets added and other settings like 'move completed', queue and management settings still seem to work, all though I haven't tested them all.

Here's the log snippet.

13:30:28 [WARNING ][deluge.core.torrentmanager    :1255] Torrent id not in torrents loading list: 'e2467cbf021192c241367b892230dc1e05c0580e'
13:30:33 [INFO    ][deluge.core.torrent           :619 ] Adding any new trackers to torrent (e2467cbf021192c241367b892230dc1e05c0580e) already in session...
13:30:33 [ERROR   ][deluge_autoadd.core           :333 ] Cannot Autoadd magnet: /home/liveuser/tmp/test.magnet: Torrent already in session (e2467cbf021192c241367b892230dc1e05c0580e).

Let me know if I should post full log. Thanks, Jim.

comment:4 by Calum, 4 years ago

Resolution: Fixed
Status: newclosed

Should be fixed in [2e466101f]

comment:5 by mhertz, 3 years ago

Cas, that commit disables watchdir internally upon first magnet added, untill next restart. Despite the label issue, then worked better before imho, as atleast watch/add functionality preserved. Thanks in advance.

comment:6 by mhertz, 3 years ago

Resolution: Fixed
Status: closedreopened

I fixed the plugin and posted a build on the forum:

https://forum.deluge-torrent.org/viewtopic.php?f=9&t=55968&p=233591#p233591

"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.

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-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."

Last edited 3 years ago by mhertz (previous) (diff)

comment:7 by Calum, 3 years ago

Thanks mhertz, I forgot to test it properly

Fixed in develop [5374d237a774]

comment:8 by Calum, 3 years ago

Resolution: Fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.