mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
Cleaned up code and fixed a few small bugs.
This commit is contained in:
parent
4bd04436bc
commit
289d451112
11 changed files with 274 additions and 286 deletions
|
@ -4,18 +4,7 @@ from nzbtomedia.nzbToMediaUtil import convert_to_ascii
|
|||
from nzbtomedia import logger
|
||||
|
||||
class autoProcessGames:
|
||||
def process(self, dirName, inputName=None, status=0, clientAgent='manual', inputCategory=None):
|
||||
if dirName is None:
|
||||
logger.error("No directory was given!")
|
||||
return 1 # failure
|
||||
|
||||
# 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 process(self, section, dirName, inputName=None, status=0, clientAgent='manual', inputCategory=None):
|
||||
status = int(status)
|
||||
|
||||
host = nzbtomedia.CFG[section][inputCategory]["host"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue