Re-coded autoProcessMovie to now retrieve the imdbID via a API call to IMDB if we can't find one to be used in narrowing our release search results down plus we use the download_id if present to help narrow the results even more.

The results returned are a dictionary of releases instead of just variables so that after a call to CP renamer we can call our function to get the new release results and run a comnparison and get the changed key/val and check status along with other variables that may have changed.

This new code will allow for manually downloading movies that normally could not be snatched from CP it self due to provider results not containing them, simply placing the newly downloaded files into the post-process folder and running our scripts manually will allow CP to manually post-process and add the movie to its database properly now.
This commit is contained in:
echel0n 2014-04-17 03:53:15 -07:00
commit 94354bb7d9
3 changed files with 108 additions and 143 deletions

View file

@ -408,19 +408,15 @@ def get_dirnames(section, subsections=None):
if watch_dir:
dirNames.extend([os.path.join(watch_dir, o) for o in os.listdir(watch_dir) if
os.path.isdir(os.path.join(watch_dir, o))])
if not dirNames:
logger.warning("%s:%s has no directories identified to scan inside %s", section, subsection, watch_dir)
if outputDirectory:
dirNames.extend([os.path.join(outputDirectory, o) for o in os.listdir(outputDirectory) if
os.path.isdir(os.path.join(outputDirectory, o))])
if not dirNames:
logger.warning("%s:%s has no directories identified to scan inside %s", section, subsection, outputDirectory)
if watch_dir is None and outputDirectory is None:
logger.warning("%s:%s has no watch_dir or outputDirectory setup to be Scanned, go fix you autoProcessMedia.cfg file.", section, subsection)
if not dirNames:
logger.warning("%s:%s has no directories identified for post-processing", section, subsection)
return dirNames
return list(set(dirNames))
def delete(dirName):
logger.info("Deleting failed files and folder %s", dirName)