catch subliminal errors and ruturn success when no new downloads found.

This commit is contained in:
clinton-hall 2014-06-28 14:07:48 +09:30
commit c039568253
2 changed files with 9 additions and 7 deletions

View file

@ -279,9 +279,9 @@ class autoProcessMovie:
logger.postprocess("SUCCESS: Snatched the next highest release ...", section)
return 0
else:
logger.postprocess("FAILED: Unable to find a higher ranked release then %s to snatch!" % (inputName),
section)
return 1
logger.postprocess("SUCCESS: Unable to find a higher ranked release then %s to snatch now. CP will keep searching!"
% (inputName), section)
return 0 #
# Added a releease that was not in the wanted list so confirm rename successful by finding this movie media.list.
if not release:

View file

@ -881,10 +881,12 @@ def import_subs(filename):
return
logger.debug("Attempting to download subtitles for %s" %(filename), 'SUBTITLES')
video = subliminal.scan_video(filename, subtitles=True, embedded_subtitles=True)
subtitles = subliminal.download_best_subtitles([video], languages, hearing_impaired=False)
subliminal.save_subtitles(subtitles)
try:
video = subliminal.scan_video(filename, subtitles=True, embedded_subtitles=True)
subtitles = subliminal.download_best_subtitles([video], languages, hearing_impaired=False)
subliminal.save_subtitles(subtitles)
except:
logger.error("Failed to download subtitles for %s" %(filename), 'SUBTITLES')
def backupVersionedFile(old_file, version):
numTries = 0