def play_movie_part(self, title, player_url): try: streams = dreamfilm.streams_from_player_url(player_url) return self.select_stream(title, streams) except Exception, e: dialog = self.xbmcgui.Dialog() print 'EEEE' print str(e) dialog.ok("Error", "Failed to open stream: %s" % player_url)
def play_movie(self, title, players_data): try: players = json.loads(players_data) streams = dreamfilm.streams_from_player_url(players[0]['url']) return self.select_stream(title, streams) except Exception, e: print str(e) dialog = self.xbmcgui.Dialog() dialog.ok("Error", "Failed to open stream")
def play_movie_part(self, title, player_url): try: streams = dreamfilm.streams_from_player_url(player_url) subtitles = dreamfilm.subtitles_from_url(player_url) return self.select_stream(title, streams, subtitles) except Exception, e: dialog = self.xbmcgui.Dialog() print 'EEEE' print(traceback.format_exc()) dialog.ok("Error", "Failed to open stream: %s" % player_url)
def play_episode(self, title, season_number, episode_number, url): try: streams = dreamfilm.streams_from_player_url(url) name = '%s S%sE%s' % (title, season_number, episode_number) return self.select_stream(name, streams) except Exception, e: print 'EEEE' print str(e) dialog = self.xbmcgui.Dialog() return dialog.ok("Error", "Failed to open stream: %s" % url)