Skip to content

Instantly share code, notes, and snippets.

@henryjfry
Created October 28, 2019 21:22
Show Gist options
  • Save henryjfry/915fb00c2dc6a29fb9c75476cd8c9e24 to your computer and use it in GitHub Desktop.
Save henryjfry/915fb00c2dc6a29fb9c75476cd8c9e24 to your computer and use it in GitHub Desktop.
/home/osmc/.kodi/addons/script.extendedinfo/resources/lib/DialogSeasonInfo.py
@ch.action('contextmenu', 2000)
def context_menu(self):
Utils.show_busy()
if self.listitem.getProperty('dbid') and self.listitem.getProperty('dbid') != 0:
dbid = self.listitem.getProperty('dbid')
else:
dbid = 0
item_id = self.listitem.getProperty('id')
episode_id = self.listitem.getProperty('episode')
# xbmc.log(str(dbid)+'===>OPENINFO', level=xbmc.LOGNOTICE)
imdb_id = Utils.fetch(TheMovieDB.get_tvshow_ids(item_id), 'imdb_id')
tvdb_id = Utils.fetch(TheMovieDB.get_tvshow_ids(item_id), 'tvdb_id')
listitems = ['Play']
selection = xbmcgui.Dialog().select(heading='Choose option', list=listitems)
if selection == 0:
url = 'plugin://plugin.video.openmeta/tv/play/%s/%s/%s' % (Utils.fetch(TheMovieDB.get_tvshow_ids(self.tvshow_id), 'tvdb_id'), self.info['season'], episode_id)
if self.listitem.getProperty('dbid'):
dbid = self.listitem.getProperty('dbid')
else:
dbid = 0
PLAYER.play_from_button(url, listitem=None, window=self, type='episodeid', dbid=dbid)
# Utils.hide_busy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment