Lowered utorrent args by 1. remove uselink test

Since we don't pass sys.argv[1] as 'utorrent' we need to reduce the input arg numbers by 1.
We can't (as I understand) test for useLink here unless we pass it in... so let's just set up utorrentClass anyway and test for uselink back in TorrentToMedia.py
also added try, except as this can cause issues if these parameters are not passed in... maybe a bit unnecessary, but doesn't hurt.
This commit is contained in:
Clinton Hall 2013-02-25 22:34:24 -08:00
commit dc379491e8

View file

@ -18,14 +18,17 @@ def parse_other(args):
def parse_utorrent(args):
# uTorrent usage: call TorrentToMedia.py "%D" "%N" "%L" "%I"
inputDirectory = os.path.normpath(sys.argv[2])
inputName = sys.argv[3]
inputDirectory = os.path.normpath(sys.argv[1])
inputName = sys.argv[2]
try:
inputCategory = sys.argv[4]
inputCategory = sys.argv[3]
except:
inputCategory = ''
inputHash = sys.argv[5]
if inputHash and useLink:
try:
inputHash = sys.argv[4]
except:
inputHash = ''
if inputHash:
utorrentClass = UTorrentClient(uTorrentWEBui, uTorrentUSR, uTorrentPWD)
def parse_deluge(args):