diff --git a/imdb/src/plugin.py b/imdb/src/plugin.py index 32025b48b..5f86f3501 100644 --- a/imdb/src/plugin.py +++ b/imdb/src/plugin.py @@ -650,6 +650,9 @@ def contextMenuPressed(self): (_("Search Trailer"), self.searchYttrailer), )) + if isPluginInstalled("SubsSupport"): + list.append((_("SubsSupport search"), self.searchSubsSupport)) + for video in self.videos: list.append((video[0], self.playVideo, video[1], video[2])) @@ -759,6 +762,19 @@ def searchYttrailer(self): self.session.open(YTTrailerList, self.eventName) + def searchSubsSupport(self): + try: + from Plugins.Extensions.SubsSupport.subtitles import E2SubsSeeker, SubsSearch, initSubsSettings + except ImportError as ie: + self["statusbar"].setText(_("SubsSupport import failed")) + return + + settings = initSubsSettings().search + titles = [self.eventName] + if self.originalName != self.eventName: + titles.append(self.originalName) + self.session.open(SubsSearch, E2SubsSeeker(self.session, settings), settings, searchTitles=titles, standAlone=True) + def openVirtualKeyBoard(self): self.session.openWithCallback( self.gotSearchString, @@ -974,6 +990,7 @@ def IMDBparse(self): tmd = {} self.eventName = get(fold, ('titleText', 'text')) + self.originalName = get(fold, ('originalTitleText', 'text')) self.titleId = get(fold, 'id') self["key_yellow"].setText(_("Details"))