From 3d717a62168ddd9dcf6b7fd32914814b42fffca0 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Wed, 20 Feb 2013 18:49:14 -0800 Subject: [PATCH] minor fixes... now compiles. Should run --- TorrentToMedia.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TorrentToMedia.py b/TorrentToMedia.py index 523531b9..213a1f6e 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -55,7 +55,7 @@ def category_search(inputDirectory, inputCategory, root, inputName, categories): else: #this is a problem! if we don't have Torrent name and are in the root category dir, we can't proceed. Logger.error("SEARCH: Could not identify a torrent name and the directory passed is common to all downloads for category %s. Exiting.", categorySearch[1]) sys.exit(-1) # Oh yeah.... WE ARE DONE! - else if categorySearch2[1] == inputName and inputName: #we have identified a unique directory. + elif categorySearch2[1] == inputName and inputName: #we have identified a unique directory. Logger.info("SEARCH: Files appear to be in their own directory") if inputCategory: #we are ok to proceed. break # we are done @@ -63,7 +63,7 @@ def category_search(inputDirectory, inputCategory, root, inputName, categories): Logger.debug("SEARCH: Continuing scan to determin category.") continue # keep going else: - if x = 9: # This is the last pass in the loop and we didn't find anything. + if x == 9: # This is the last pass in the loop and we didn't find anything. notfound = 1 break # we are done else: @@ -237,7 +237,7 @@ config.read(configFilename) if len(sys.argv) == 2: #for other clients we assume we must at least get the directory. # We will assume this to be the passin from deluge. torrent id, torrent name, torrent save path. - inputDirectory = os.path.normpath(sys.argv[1) + inputDirectory = os.path.normpath(sys.argv[1]) inputName = '' # We dont have a name yet inputCategory = '' # We dont have a category yet