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=?',