Skip to content

Commit

Permalink
Magnets added with a label have the label removed when magnet metadat…
Browse files Browse the repository at this point in the history
…a is received
  • Loading branch information
sammys committed Jun 5, 2021
1 parent 3a4e80c commit d119524
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion labelplus/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,9 @@ def on_torrent_added(self, torrent_id, from_state):
label_id = self.__pending_labels.pop(torrent_id)
self._set_torrent_label(torrent_id, label_id)
else:
label_id = self._do_autolabel_torrent(torrent_id)
target_label_id = self._find_autolabel_match(torrent_id)
if target_label_id != labelplus.common.label.ID_NONE:
self._do_autolabel_torrent(torrent_id)

if label_id != labelplus.common.label.ID_NONE:
self._move_torrents([torrent_id])
Expand All @@ -752,6 +754,7 @@ def on_torrent_metadata_received(self, alert):
self.on_torrent_added(torrent_id, False)
self.__pending_magnet_ids.remove(torrent_id)


@check_init
def on_torrent_removed(self, torrent_id):

Expand Down

0 comments on commit d119524

Please sign in to comment.