Add deluge, qbittorrent to scheduled torrent removal

This commit is contained in:
Ade
2017-03-26 11:36:38 +13:00
parent de3b73dfa5
commit a96b186825

View File

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