Skip to content

Commit

Permalink
Merge upstreams PRs #1 & bdutro#7
Browse files Browse the repository at this point in the history
- 1:  bdutro#1
      (inverse regex)
- 7:  bdutro#7
      (Magnets added with a label have the label removed when magnet metadata is received)
  • Loading branch information
laur89 committed Dec 6, 2021
2 parents d67e53c + d119524 commit 192c4f1
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 192c4f1

Please sign in to comment.