mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
parent
04cb189c34
commit
3d50c82281
6 changed files with 7 additions and 15 deletions
|
@ -37,7 +37,8 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
|||
"We could not find a section with containing a download category labeled %s in your autoProcessMedia.cfg, Exiting!" % inputCategory)
|
||||
return -1
|
||||
|
||||
Torrent_NoLink = int(nzbtomedia.CFG[section][inputCategory]["Torrent_NoLink"]) or 0
|
||||
try:Torrent_NoLink = int(nzbtomedia.CFG[section][inputCategory]["Torrent_NoLink"])
|
||||
except:Torrent_NoLink = 0
|
||||
|
||||
if clientAgent != 'manual':
|
||||
pause_torrent(clientAgent, inputHash, inputID, inputName)
|
||||
|
|
|
@ -9,6 +9,7 @@ SYS_ARGV = sys.argv[1:]
|
|||
APP_FILENAME = sys.argv[0]
|
||||
APP_NAME = os.path.basename(APP_FILENAME)
|
||||
PROGRAM_DIR = os.path.dirname(os.path.normpath(os.path.abspath(os.path.join(__file__, os.pardir))))
|
||||
LIBS_DIR = os.path.join(PROGRAM_DIR, 'lib')
|
||||
LOG_DIR = os.path.join(PROGRAM_DIR, 'logs')
|
||||
LOG_FILE = os.path.join(LOG_DIR, 'postprocess.log')
|
||||
CONFIG_FILE = os.path.join(PROGRAM_DIR, 'autoProcessMedia.cfg')
|
||||
|
@ -17,7 +18,7 @@ CONFIG_MOVIE_FILE = os.path.join(PROGRAM_DIR, 'autoProcessMovie.cfg')
|
|||
CONFIG_TV_FILE = os.path.join(PROGRAM_DIR, 'autoProcessTv.cfg')
|
||||
|
||||
# add our custom libs to the system path
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(PROGRAM_DIR, 'lib')))
|
||||
sys.path.insert(0, LIBS_DIR)
|
||||
|
||||
from nzbtomedia import logger, versionCheck
|
||||
from nzbtomedia.nzbToMediaConfig import config
|
||||
|
|
|
@ -130,9 +130,6 @@ class autoProcessMovie:
|
|||
|
||||
imdbid = find_imdbid(dirName, nzbName)
|
||||
release = self.get_release(baseURL, imdbid, download_id)
|
||||
#if not release:
|
||||
# logger.error('Unable to find %s in your wanted list, skipping ...' % (nzbName), section)
|
||||
# return 1
|
||||
|
||||
# pull info from release found if available
|
||||
release_id = None
|
||||
|
|
|
@ -56,10 +56,6 @@ class autoProcessTV:
|
|||
process_method = nzbtomedia.CFG[section][inputCategory]["process_method"]
|
||||
except:
|
||||
process_method = None
|
||||
try:
|
||||
Torrent_NoLink = int(nzbtomedia.CFG[section][inputCategory]["Torrent_NoLink"])
|
||||
except:
|
||||
Torrent_NoLink = 0
|
||||
try:
|
||||
remote_path = nzbtomedia.CFG[section][inputCategory]["remote_path"]
|
||||
except:
|
||||
|
@ -116,7 +112,7 @@ class autoProcessTV:
|
|||
fork_params[param] = dirName_new
|
||||
|
||||
if param == "process_method":
|
||||
if fork in nzbtomedia.SICKBEARD_TORRENT and Torrent_NoLink == 1 and not clientAgent in ['nzbget','sabnzbd']: #use default SickBeard settings here.
|
||||
if fork in nzbtomedia.SICKBEARD_TORRENT and not clientAgent in ['nzbget','sabnzbd']: #use default SickBeard settings here.
|
||||
del fork_params[param]
|
||||
if process_method:
|
||||
fork_params[param] = process_method
|
||||
|
|
|
@ -126,9 +126,6 @@ class ConfigObj(configobj.ConfigObj, Section):
|
|||
if option == "failed_fork": # change this old format
|
||||
values['failed'] = 'auto'
|
||||
values.pop(option)
|
||||
if option == "Torrent_ForceLink":
|
||||
values['Torrent_NoLink'] = value
|
||||
values.pop(option)
|
||||
if option == "outputDirectory": # move this to new location format
|
||||
CFG_NEW['Torrent'][option] = os.path.split(os.path.normpath(value))[0]
|
||||
values.pop(option)
|
||||
|
|
|
@ -442,7 +442,7 @@ def cleanProcDirs():
|
|||
if nzbtomedia.CFG[section][category].isenabled():
|
||||
dirNames = get_dirnames(section, category)
|
||||
for dirName in dirNames:
|
||||
num_files = len(listMediaFiles(dirName, archives=False))
|
||||
num_files = len(listMediaFiles(dirName))
|
||||
if num_files > 0:
|
||||
logger.info(
|
||||
"Directory %s still contains %s unprocessed file(s), skipping ..." % (dirName, num_files),
|
||||
|
@ -631,7 +631,7 @@ def find_imdbid(dirName, nzbName):
|
|||
return imdbid
|
||||
|
||||
logger.info('Searching IMDB for imdbID ...')
|
||||
guess = guessit.guess_video_info(dirName)
|
||||
guess = guessit.guess_movie_info(nzbName)
|
||||
if guess:
|
||||
# Movie Title
|
||||
title = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue