Skip to content

Instantly share code, notes, and snippets.

@henryjfry
Last active January 19, 2020 12:28
Show Gist options
  • Save henryjfry/eef8d26c845f405b774ef4230d19dc44 to your computer and use it in GitHub Desktop.
Save henryjfry/eef8d26c845f405b774ef4230d19dc44 to your computer and use it in GitHub Desktop.
Openinfo - Season Context Menu - Play Foxy Streams (~/.kodi/addons/script.extendedinfo/resources/lib/DialogSeasonInfo.py)
listitems = ['Play']
listitems += ['Play - Foxy Streams']
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)
if selection == 1:
url = 'plugin://plugin.video.foxystreams/?mode=tv&id=%s&episode=%s&season=%s&title=%s&plot=%s&showname=%s&name=%s' % (Utils.fetch(TheMovieDB.get_tvshow_ids(self.tvshow_id), 'tvdb_id'), episode_id, self.info['season'],urllib.quote(self.data['episodes'][int(episode_id)-1]['title'], safe=''),urllib.quote(self.data['episodes'][int(episode_id)-1]['Plot'], safe=''),urllib.quote(self.info['TVShowTitle'], safe=''),urllib.quote(self.info['TVShowTitle'], safe=''))
# xbmc.log(str(url)+'===>OPENINFO', level=xbmc.LOGNOTICE)
# xbmc.log(str(self.info['poster_original'])+'===>OPENINFO', level=xbmc.LOGNOTICE)
# self.close()
# Utils.hide_busy()
# xbmc.executebuiltin('PlayMedia(%s)' % url)
PLAYER.play_media(url, listitem=None, window=self)
if selection == 2:
# url = 'plugin://plugin.video.themoviedb.helper?info=play&tvdb_id=%s&type=episode&season=%s&episode=%s' % (Utils.fetch(TheMovieDB.get_tvshow_ids(self.tvshow_id), 'tvdb_id'), self.listitem.getProperty('season'), episode_id)
url = 'plugin://plugin.video.themoviedb.helper?info=play&tmdb_id=%s&type=episode&season=%s&episode=%s' % (self.tvshow_id, self.listitem.getProperty('season'), episode_id)
# xbmc.log(str(self.info)+'===>OPENINFO', level=xbmc.LOGNOTICE)
# xbmc.log(str(self.data)+'===>OPENINFO', level=xbmc.LOGNOTICE)
# xbmc.log(str(self.info['poster_original'])+'===>OPENINFO', level=xbmc.LOGNOTICE)
# self.close()
# Utils.hide_busy()
# xbmc.executebuiltin('RunPlugin(%s)' % url)
xbmc.log(str(url)+'===>OPENINFO', level=xbmc.LOGNOTICE)
PLAYER.play_from_button(url, listitem=None, window=self)
# Utils.hide_busy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment