mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
catch subliminal errors and ruturn success when no new downloads found.
This commit is contained in:
parent
eff7db81b8
commit
c039568253
2 changed files with 9 additions and 7 deletions
|
@ -279,9 +279,9 @@ class autoProcessMovie:
|
||||||
logger.postprocess("SUCCESS: Snatched the next highest release ...", section)
|
logger.postprocess("SUCCESS: Snatched the next highest release ...", section)
|
||||||
return 0
|
return 0
|
||||||
else:
|
else:
|
||||||
logger.postprocess("FAILED: Unable to find a higher ranked release then %s to snatch!" % (inputName),
|
logger.postprocess("SUCCESS: Unable to find a higher ranked release then %s to snatch now. CP will keep searching!"
|
||||||
section)
|
% (inputName), section)
|
||||||
return 1
|
return 0 #
|
||||||
|
|
||||||
# Added a releease that was not in the wanted list so confirm rename successful by finding this movie media.list.
|
# Added a releease that was not in the wanted list so confirm rename successful by finding this movie media.list.
|
||||||
if not release:
|
if not release:
|
||||||
|
|
|
@ -881,10 +881,12 @@ def import_subs(filename):
|
||||||
return
|
return
|
||||||
|
|
||||||
logger.debug("Attempting to download subtitles for %s" %(filename), 'SUBTITLES')
|
logger.debug("Attempting to download subtitles for %s" %(filename), 'SUBTITLES')
|
||||||
|
try:
|
||||||
video = subliminal.scan_video(filename, subtitles=True, embedded_subtitles=True)
|
video = subliminal.scan_video(filename, subtitles=True, embedded_subtitles=True)
|
||||||
subtitles = subliminal.download_best_subtitles([video], languages, hearing_impaired=False)
|
subtitles = subliminal.download_best_subtitles([video], languages, hearing_impaired=False)
|
||||||
subliminal.save_subtitles(subtitles)
|
subliminal.save_subtitles(subtitles)
|
||||||
|
except:
|
||||||
|
logger.error("Failed to download subtitles for %s" %(filename), 'SUBTITLES')
|
||||||
|
|
||||||
def backupVersionedFile(old_file, version):
|
def backupVersionedFile(old_file, version):
|
||||||
numTries = 0
|
numTries = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue