add Vuze client. #563

This commit is contained in:
clinton-hall 2014-10-02 13:40:32 +09:30
commit 4f025dd6ca
3 changed files with 38 additions and 2 deletions

View file

@ -211,7 +211,7 @@
default_downloadDirectory = default_downloadDirectory =
[Torrent] [Torrent]
###### clientAgent - Supported clients: utorrent, transmission, deluge, rtorrent, other ###### clientAgent - Supported clients: utorrent, transmission, deluge, rtorrent, vuze, other
clientAgent = other clientAgent = other
###### useLink - Set to hard for physical links, sym for symbolic links, move to move, and no to not use links (copy) ###### useLink - Set to hard for physical links, sym for symbolic links, move to move, and no to not use links (copy)
useLink = hard useLink = hard

View file

@ -316,7 +316,7 @@ def initialize(section=None):
if isinstance(GROUPS, str): GROUPS = GROUPS.split(',') if isinstance(GROUPS, str): GROUPS = GROUPS.split(',')
if GROUPS == ['']: GROUPS = None if GROUPS == ['']: GROUPS = None
TORRENT_CLIENTAGENT = CFG["Torrent"]["clientAgent"] # utorrent | deluge | transmission | rtorrent | other TORRENT_CLIENTAGENT = CFG["Torrent"]["clientAgent"] # utorrent | deluge | transmission | rtorrent | vuze |other
USELINK = CFG["Torrent"]["useLink"] # no | hard | sym USELINK = CFG["Torrent"]["useLink"] # no | hard | sym
OUTPUTDIRECTORY = CFG["Torrent"]["outputDirectory"] # /abs/path/to/complete/ OUTPUTDIRECTORY = CFG["Torrent"]["outputDirectory"] # /abs/path/to/complete/
TORRENT_DEFAULTDIR = CFG["Torrent"]["default_downloadDirectory"] TORRENT_DEFAULTDIR = CFG["Torrent"]["default_downloadDirectory"]

View file

@ -490,6 +490,41 @@ def parse_transmission(args):
return inputDirectory, inputName, inputCategory, inputHash, inputID return inputDirectory, inputName, inputCategory, inputHash, inputID
def parse_vuze(args):
# vuze usage: C:\full\path\to\nzbToMedia\TorrentToMedia.py "%D%N%L%I%K%F"
try:
input = args[1].split(',')
except:
input = []
try:
inputDirectory = os.path.normpath(input[0])
except:
inputDirectory = ''
try:
inputName = input[1]
except:
inputName = ''
try:
inputCategory = input[2]
except:
inputCategory = ''
try:
inputHash = input[3]
except:
inputHash = ''
try:
inputID = input[3]
except:
inputID = ''
try:
if input[4] == 'single':
inputName = input[5]
except:
pass
return inputDirectory, inputName, inputCategory, inputHash, inputID
def parse_args(clientAgent, args): def parse_args(clientAgent, args):
clients = { clients = {
'other': parse_other, 'other': parse_other,
@ -497,6 +532,7 @@ def parse_args(clientAgent, args):
'utorrent': parse_utorrent, 'utorrent': parse_utorrent,
'deluge': parse_deluge, 'deluge': parse_deluge,
'transmission': parse_transmission, 'transmission': parse_transmission,
'vuze': parse_vuze,
} }
try: try: