From: Felix Domke Date: Fri, 25 May 2007 15:02:22 +0000 (+0000) Subject: properly initialize selected subtitle, even if they are not available X-Git-Tag: 2.6.0~2221 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/bbfcbdab9160f265ecda25e95f6273ce0c365449 properly initialize selected subtitle, even if they are not available --- diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index ba1bab23..99f0dc48 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -1919,6 +1919,7 @@ class InfoBarSubtitleSupport(object): iPlayableService.evUpdatedInfo: self.__updatedInfo }) self.cached_subtitle_checked = False + self.__selected_subtitle = None def __serviceStopped(self): self.subtitle_window.hide() @@ -1929,8 +1930,7 @@ class InfoBarSubtitleSupport(object): if not self.cached_subtitle_checked: subtitle = self.getCurrentServiceSubtitle() self.cached_subtitle_checked = True - if subtitle: - self.__selected_subtitle = subtitle.getCachedSubtitle() + self.__selected_subtitle = subtitle and subtitle.getCachedSubtitle() if self.__selected_subtitle: subtitle.enableSubtitles(self.subtitle_window.instance, self.selected_subtitle) self.subtitle_window.show()