Created
October 28, 2019 21:22
-
-
Save henryjfry/915fb00c2dc6a29fb9c75476cd8c9e24 to your computer and use it in GitHub Desktop.
/home/osmc/.kodi/addons/script.extendedinfo/resources/lib/DialogSeasonInfo.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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