def play(self, name, title, year, imdb, tvdb, season, episode, show, show_alt, date, genre, url): try: if show == None: content = "movie" else: content = "episode" self.sources = self.getSources(name, title, year, imdb, tvdb, season, episode, show, show_alt, date, genre) if self.sources == []: raise Exception() self.sources = self.sourcesFilter() if control.window.getProperty("PseudoTVRunning") == "True": url = self.sourcesDirect() elif url == "dialog://": url = self.sourcesDialog() elif url == "direct://": url = self.sourcesDirect() elif ( not control.infoLabel("Container.FolderPath").startswith("plugin://") and control.setting("autoplay_library") == "false" ): url = self.sourcesDialog() elif ( control.infoLabel("Container.FolderPath").startswith("plugin://") and control.setting("autoplay") == "false" ): url = self.sourcesDialog() else: url = self.sourcesDirect() if url == None: raise Exception() if url == "close://": return if control.setting("playback_info") == "true": control.infoDialog(self.selectedSource, heading=name) from modules.libraries.player import player player().run(content, name, url, imdb, tvdb) return url except: control.infoDialog(control.lang(30308).encode("utf-8")) pass
def playItem(self, content, name, imdb, tvdb, url, source, provider): try: url = self.sourcesResolve(url, provider) if url == None: raise Exception() if control.setting('playback_info') == 'true': control.infoDialog(source, heading=name) from modules.libraries.player import player player().run(content, name, url, imdb, tvdb) return url except: control.infoDialog(control.lang(30308).encode('utf-8')) pass
def play(self, name, title, year, imdb, tvdb, season, episode, show, show_alt, date, genre, url): try: if show == None: content = 'movie' else: content = 'episode' self.sources = self.getSources(name, title, year, imdb, tvdb, season, episode, show, show_alt, date, genre) if self.sources == []: raise Exception() self.sources = self.sourcesFilter() if control.window.getProperty('PseudoTVRunning') == 'True': url = self.sourcesDirect() elif url == 'dialog://': url = self.sourcesDialog() elif url == 'direct://': url = self.sourcesDirect() elif not control.infoLabel('Container.FolderPath').startswith('plugin://') and control.setting('autoplay_library') == 'false': url = self.sourcesDialog() elif control.infoLabel('Container.FolderPath').startswith('plugin://') and control.setting('autoplay') == 'false': url = self.sourcesDialog() else: url = self.sourcesDirect() if url == None: raise Exception() if url == 'close://': return if control.setting('playback_info') == 'true': control.infoDialog(self.selectedSource, heading=name) from modules.libraries.player import player player().run(content, name, url, imdb, tvdb) return url except: control.infoDialog(control.lang(30308).encode('utf-8')) pass