Skip to content

Instantly share code, notes, and snippets.

@henryjfry
Created October 25, 2019 13:02
Show Gist options
  • Save henryjfry/eab182e630e7be1e181360156fbe8dbf to your computer and use it in GitHub Desktop.
Save henryjfry/eab182e630e7be1e181360156fbe8dbf to your computer and use it in GitHub Desktop.
/home/osmc/.kodi/addons/script.extendedinfo/resources/lib/DialogEpisodeInfo.py => change episode play behaviour for speed + show_busy/hide_busy
@ch.click(8)
def play_episode(self):
Utils.show_busy()
url = 'plugin://plugin.video.openmeta/tv/play/%s/%s/%s' % (Utils.fetch(TheMovieDB.get_tvshow_ids(self.tvshow_id), 'tvdb_id'), self.info['season'], self.info['episode'])
Utils.hide_busy()
xbmc.executebuiltin('RunPlugin(%s)' % url)
# if self.dbid and int(self.dbid) > 0:
# dbid = self.dbid
# url = ''
# PLAYER.play_from_button(url, listitem=None, window=self, type='episodeid', dbid=dbid)
# else:
# url = 'plugin://plugin.video.openmeta/tv/play/%s/%s/%s' % (Utils.fetch(TheMovieDB.get_tvshow_ids(self.tvshow_id), 'tvdb_id'), self.info['season'], self.info['episode'])
# xbmc.executebuiltin('RunPlugin(%s)' % url)
@ch.action('contextmenu', 8)
def play_episode_choose_player(self):
Utils.show_busy()
url = 'plugin://plugin.video.openmeta/tv/play_choose_player/%s/%s/%s/False' % (Utils.fetch(TheMovieDB.get_tvshow_ids(self.tvshow_id), 'tvdb_id'), self.info['season'], self.info['episode'])
Utils.hide_busy()
xbmc.executebuiltin('RunPlugin(%s)' % url)
# if self.dbid and int(self.dbid) > 0:
# dbid = self.dbid
# url = ''
# PLAYER.play_from_button(url, listitem=None, window=self, type='episodeid', dbid=dbid)
# else:
# url = 'plugin://plugin.video.openmeta/tv/play_choose_player/%s/%s/%s/False' % (Utils.fetch(TheMovieDB.get_tvshow_ids(self.tvshow_id), 'tvdb_id'), self.info['season'], self.info['episode'])
# xbmc.executebuiltin('RunPlugin(%s)' % url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment