Skip to content

Commit

Permalink
Yeah, we need that.
Browse files Browse the repository at this point in the history
Add is_finished status change on start/stop of extraction check, make sure we don't copy files as they're being extracted.
  • Loading branch information
d8ahazard committed Feb 8, 2020
1 parent d82d883 commit 8d35ff6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deluge_simpleextractor/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _on_torrent_finished(self, torrent_id):
tid = component.get('TorrentManager').torrents[torrent_id]
t_status = tid.get_status([], False, False, True)
do_extract = False

tid.is_finished = False
log.info("Processing completed torrent %s", t_status)
# Fetch our torrent's label
labels = self.get_labels(torrent_id)
Expand Down Expand Up @@ -227,6 +227,8 @@ def on_extract(result, torrent_id, fpath):
cmd[0], cmd[1].split() + [str(fpath)], os.environ, str(dest)
)
d.addCallback(on_extract, torrent_id, fpath)

tid.is_finished = True
log.info("Torrent extraction/handling complete.")

def get_labels(self, torrent_id):
Expand Down

0 comments on commit 8d35ff6

Please sign in to comment.