Skip to content

Magnets added with a label have the label removed when magnet metadata is received - #7

Open
sammys wants to merge 1 commit into
bdutro:masterfrom
sammys:add-torrent-with-label
Open

Magnets added with a label have the label removed when magnet metadata is received#7
sammys wants to merge 1 commit into
bdutro:masterfrom
sammys:add-torrent-with-label

Conversation

@sammys

@sammys sammys commented Jun 5, 2021

Copy link
Copy Markdown

When on_torrent_added is executed and there is a pending label the label is set correctly. Unfortunately, when the recently added on_torrent_metadata_received is handled it calls on_torrent_added again. On this second call the autolabel value is used whether it is ID_NONE or not. The on_torrent_added handler was not originally designed to be called twice for the same torrent.

This PR makes it possible for it to be called twice. First time it'll use the pending label. Second time it'll use an autolabel only if it is not ID_NONE.

laur89 added a commit to laur89/deluge-labelplus that referenced this pull request Dec 6, 2021
- 1:  bdutro#1
      (inverse regex)
- 7:  bdutro#7
      (Magnets added with a label have the label removed when magnet metadata is received)
laur89 added a commit to laur89/deluge-labelplus that referenced this pull request Dec 6, 2021


- in else-block, label_id param, referenced later on, was left undefined;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant