Merge pull request #1016 from JackDandy/feature/FixNotifySubtitle

Fix NotifierFactory attribute enabled_ondownloadsubtitles…
This commit is contained in:
JackDandy 2017-12-02 20:08:11 +00:00 committed by GitHub
commit 9b06d6d60f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View file

@ -155,6 +155,7 @@
* Change reduce number of DB calls for extra_info_no_name
* Add parse repack, proper level to recent search flow
* Change reenable Trakt Notifier to update collections at end of PP
* Fix NotifierFactory attribute enabled_ondownloadsubtitles should be enabled_onsubtitlesdownload
### 0.12.37 (2017-11-12 10:35:00 UTC)

View file

@ -143,7 +143,7 @@ def notify_download(ep_name):
def notify_subtitle_download(ep_name, lang):
for n in NotifierFactory().get_enabled('ondownloadsubtitles'):
for n in NotifierFactory().get_enabled('onsubtitledownload'):
n.notify_subtitle_download(ep_name, lang)

View file

@ -1682,7 +1682,12 @@ class TVEpisode(object):
newsubtitles = set(self.subtitles).difference(set(previous_subtitles))
if newsubtitles:
subtitleList = ", ".join(subliminal.language.Language(x).name for x in newsubtitles)
try:
subtitleList = ", ".join(subliminal.language.Language(x).name for x in newsubtitles)
except(StandardError, Exception):
logger.log('Could not parse a language to use to fetch subtitles for episode %sx%s' %
(self.season, self.episode), logger.DEBUG)
return
logger.log('%s: Downloaded %s subtitles for episode %sx%s' %
(self.show.indexerid, subtitleList, self.season, self.episode), logger.DEBUG)