Cleaned up code and fixed a few small bugs.

This commit is contained in:
echel0n 2014-04-24 21:23:10 -07:00
commit 289d451112
11 changed files with 274 additions and 286 deletions

View file

@ -6,14 +6,7 @@ from nzbtomedia.nzbToMediaUtil import convert_to_ascii
from nzbtomedia import logger
class autoProcessComics:
def processEpisode(self, dirName, inputName=None, status=0, clientAgent='manual', inputCategory=None):
# auto-detect correct section
section = nzbtomedia.CFG.findsection(inputCategory)
if not section:
logger.error(
"We were unable to find a section for category %s, please check your autoProcessMedia.cfg file." % inputCategory)
return 1
def processEpisode(self, section, dirName, inputName=None, status=0, clientAgent='manual', inputCategory=None):
host = nzbtomedia.CFG[section][inputCategory]["host"]
port = nzbtomedia.CFG[section][inputCategory]["port"]
username = nzbtomedia.CFG[section][inputCategory]["username"]