works for utorrent and Transmission

This commit is contained in:
clinton-hall 2013-02-13 16:10:34 -08:00
parent 333a7071be
commit d74e1e436d

View file

@ -111,22 +111,24 @@ Movie_Cat = config.get("CouchPotato", "category")
useLink = int(config.get("Torrent", "uselink")) useLink = int(config.get("Torrent", "uselink"))
extractionTool = config.get("Torrent", "extractiontool") extractionTool = config.get("Torrent", "extractiontool")
if not Category: DirBase = os.path.split(os.path.normpath(Directory)) #Test for blackhole sub-directory.
DirBase = os.path.split(os.path.normpath(Directory)) #Test for blackhole sub-directory. if DirBase[1] == Name:
if DirBase[1] == Name: print "INFO: Files appear to be in their own directory"
print "INFO: Files appear to be in their own directory" DirBase2 = os.path.split(os.path.normpath(DirBase[0]))
DirBase2 = os.path.split(os.path.normpath(DirBase[0])) if DirBase2[1] == Movie_Cat or DirBase == TV_Cat:
if DirBase2[1] == Movie_Cat or DirBase == TV_Cat: if not Category:
print "INFO: Determined Category to be: %s" % (DirBase2[1]) print "INFO: Determined Category to be: %s" % (DirBase2[1])
Category = DirBase2[1] Category = DirBase2[1]
elif DirBase[1] == Movie_Cat or DirBase == TV_Cat: elif DirBase[1] == Movie_Cat or DirBase == TV_Cat:
print "INFO: The directory passed is the root directory for category %s" % (DirBase[1]) print "INFO: The directory passed is the root directory for category %s" % (DirBase[1])
print "WARNING: You should change settings to download torrents to their own directory" print "WARNING: You should change settings to download torrents to their own directory"
print "INFO: We will try and determine which files to process, individually" print "INFO: We will try and determine which files to process, individually"
root = 1
if not Category:
print "INFO: Determined Category to be: %s" % (DirBase2[1])
Category = DirBase[1] Category = DirBase[1]
root = 1
if Category == Movie_Cat: if Category == Movie_Cat:
destination = os.path.join(Movie_dest, Name) destination = os.path.join(Movie_dest, Name)
elif Category == TV_Cat: elif Category == TV_Cat: