Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sammys
Copy link

@sammys sammys commented Jun 5, 2021

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