From a96b186825ba55bec03698eb992c3841f38fe3d5 Mon Sep 17 00:00:00 2001 From: Ade Date: Sun, 26 Mar 2017 11:36:38 +1300 Subject: [PATCH] Add deluge, qbittorrent to scheduled torrent removal --- headphones/torrentfinished.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/headphones/torrentfinished.py b/headphones/torrentfinished.py index bc622291..656f2f5d 100644 --- a/headphones/torrentfinished.py +++ b/headphones/torrentfinished.py @@ -15,7 +15,7 @@ import threading -from headphones import db, utorrent, transmission, logger +from headphones import db, utorrent, transmission, deluge, qbittorrent, logger import headphones postprocessor_lock = threading.Lock() @@ -36,10 +36,15 @@ def checkTorrentFinished(): hash = album['FolderName'] albumid = album['AlbumID'] torrent_removed = False + if headphones.CONFIG.TORRENT_DOWNLOADER == 1: torrent_removed = transmission.removeTorrent(hash, True) - else: + elif headphones.CONFIG.TORRENT_DOWNLOADER == 2: torrent_removed = utorrent.removeTorrent(hash, True) + elif headphones.CONFIG.TORRENT_DOWNLOADER == 3: + torrent_removed = deluge.removeTorrent(hash, True) + else: + torrent_removed = qbittorrent.removeTorrent(hash, True) if torrent_removed: myDB.action('DELETE from snatched WHERE status = "Seed_Processed" and AlbumID=?',