2024-03-29, 17:23
Thank you so much! @jurialmunkey
I'm making an addon that opens items from the PVR menu - I've successfully spawned the "Select Player" which will scrape the data - here's a snippet from that code.
I've incorporated your run commands from wiki and it works perfectly (still tweaking the parsing/trimming for inconsistent PVR data). The last piece of the puzzle would be to spawn the "Trakt Options" in the same context menu addon to access your "trakt options" directly from PVR guide. This should HOPEFULLY do the trick.
Thanks for helping out! You go above and beyond helping the community. Once I perfect the addon/debug, I'll share with community to see if anyone finds it helpful
I'm making an addon that opens items from the PVR menu - I've successfully spawned the "Select Player" which will scrape the data - here's a snippet from that code.
My Addon:def main():
addon = xbmcaddon.Addon()
xbmc.log("Starting add-on {0} with label {1}".format(addon.getAddonInfo('id'), sys.listitem.getLabel()), xbmc.LOGDEBUG)
vernum = xbmc.getInfoLabel('System.BuildVersion')
if "19" in str(vernum):
tmdbid = sys.listitem.getUniqueID('tmdb')
else:
tmdbid = sys.listitem.getVideoInfoTag().getUniqueID('tmdb')
item_label = sys.listitem.getVideoInfoTag().getTitle()
if not item_label:
item_label = sys.listitem.getLabel()
if not item_label:
Notification(30003)
return
item_label = cleanup_spaces(item_label)
(tv, season, episode, tid) = is_tv()
if tid != '':
xbmc.executebuiltin('Runscript(plugin.video.themoviedb.helper, play=tv, query={0}, season={1}, episode={2})'.format(quote(item_label), season, episode))
return
if not tmdbid:
if tv:
tmdbid = get_tmdb_id(item_label, 'tvshow')
else:
tmdbid = get_tmdb_id(item_label, 'movie')
if tmdbid:
try:
if tv:
xbmc.executebuiltin('Runscript(plugin.video.themoviedb.helper, play=tv, query={0}, season={1}, episode={2})'.format(quote(item_label), season, episode))
else:
xbmc.executebuiltin('Runscript(plugin.video.themoviedb.helper, play=movie, tmdb_id={0})'.format(tmdbid))
except Exception as e:
xbmc.log('Got exception {0}'.format(e), xbmc.LOGERROR)
Notification(30004)
else:
Notification(30003)
if __name__ == '__main__':
main()
I've incorporated your run commands from wiki and it works perfectly (still tweaking the parsing/trimming for inconsistent PVR data). The last piece of the puzzle would be to spawn the "Trakt Options" in the same context menu addon to access your "trakt options" directly from PVR guide. This should HOPEFULLY do the trick.
Thanks for helping out! You go above and beyond helping the community. Once I perfect the addon/debug, I'll share with community to see if anyone finds it helpful