mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
add qBittorrent parsing. Fixes #1300
This commit is contained in:
parent
ee243fbba5
commit
e34ba9af89
3 changed files with 32 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue