diff --git a/autoProcessMedia.cfg.spec b/autoProcessMedia.cfg.spec index f99be837..52484e00 100644 --- a/autoProcessMedia.cfg.spec +++ b/autoProcessMedia.cfg.spec @@ -259,7 +259,7 @@ default_downloadDirectory = [Torrent] - ###### clientAgent - Supported clients: utorrent, transmission, deluge, rtorrent, vuze, other + ###### clientAgent - Supported clients: utorrent, transmission, deluge, rtorrent, vuze, qbittorrent, other clientAgent = other ###### useLink - Set to hard for physical links, sym for symbolic links, move to move, move-sym to move and link back, and no to not use links (copy) useLink = hard diff --git a/core/__init__.py b/core/__init__.py index eb23a558..0afb1644 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -50,7 +50,7 @@ from core.databases import mainDB # Client Agents NZB_CLIENTS = ['sabnzbd', 'nzbget', 'manual'] -TORRENT_CLIENTS = ['transmission', 'deluge', 'utorrent', 'rtorrent', 'other', 'manual'] +TORRENT_CLIENTS = ['transmission', 'deluge', 'utorrent', 'rtorrent', 'qbittorrent', 'other', 'manual'] # sabnzbd constants SABNZB_NO_OF_ARGUMENTS = 8 @@ -357,7 +357,7 @@ def initialize(section=None): if GROUPS == ['']: GROUPS = None - TORRENT_CLIENTAGENT = CFG["Torrent"]["clientAgent"] # utorrent | deluge | transmission | rtorrent | vuze |other + TORRENT_CLIENTAGENT = CFG["Torrent"]["clientAgent"] # utorrent | deluge | transmission | rtorrent | vuze | qbittorrent |other USELINK = CFG["Torrent"]["useLink"] # no | hard | sym OUTPUTDIRECTORY = CFG["Torrent"]["outputDirectory"] # /abs/path/to/complete/ TORRENT_DEFAULTDIR = CFG["Torrent"]["default_downloadDirectory"] diff --git a/core/nzbToMediaUtil.py b/core/nzbToMediaUtil.py index a996525b..6d581c4b 100644 --- a/core/nzbToMediaUtil.py +++ b/core/nzbToMediaUtil.py @@ -588,6 +588,34 @@ def parse_vuze(args): return inputDirectory, inputName, inputCategory, inputHash, inputID +def parse_qbittorrent(args): + # qbittorrent usage: C:\full\path\to\nzbToMedia\TorrentToMedia.py "%D|%N|%L|%I" + try: + input = args[1].split('|') + except: + input = [] + try: + inputDirectory = os.path.normpath(input[0].replace('"','')) + except: + inputDirectory = '' + try: + inputName = input[1].replace('"','') + except: + inputName = '' + try: + inputCategory = input[2].replace('"','') + except: + inputCategory = '' + try: + inputHash = input[3].replace('"','') + except: + inputHash = '' + try: + inputID = input[3].replace('"','') + except: + inputID = '' + + return inputDirectory, inputName, inputCategory, inputHash, inputID def parse_args(clientAgent, args): clients = { @@ -596,6 +624,7 @@ def parse_args(clientAgent, args): 'utorrent': parse_utorrent, 'deluge': parse_deluge, 'transmission': parse_transmission, + 'qbittorrent': parse_qbittorrent, 'vuze': parse_vuze, }