• 1
  • 81
  • 82
  • 83
  • 84(current)
  • 85
Release plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners
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.

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  Rofl
Reply
nvm, I was missing an underscore and the order was wrong - oops! Works now.

Code Snippet:
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, sync_trakt, tmdb_type=tv, query={0}, season={1}, episode={2}, cache_refresh)'.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, sync_trakt, tmdb_type=tv, query={0}, season={1}, episode={2}, cache_refresh)'.format(quote(item_label), season, episode))
            else:
                xbmc.executebuiltin('Runscript(plugin.video.themoviedb.helper, sync_trakt, tmdb_id={0}, tmdb_type=movie, cache_refresh)'.format(tmdbid))
        except Exception as e:
            xbmc.log('Got exception {0}'.format(e), xbmc.LOGERROR)
            Notification(30004)
    else:
        Notification(30003)
       
if __name__ == '__main__':
    main()
Reply
Hello, I have translated the Plugin into Spanish for those who may be interested

Spanish

Decompress and add
Reply
Hi @jurialmunkey Thanks for your help on Github earlier. I was hoping you could clarify something about how themoviedb.helper & the Service monitor work? when I add a tvshow with a Parsing NFO file for using a episode group instead of the default scrape. the episodes are unable to utilise tmdb helper calls for studio or next aired etc much the same as if i had scraped the series using tvdb. I assume this is because the episode reference has been changed and the helper doesn't know this and so is unable to find the episode to lookup? 

is there a way around this other than using the default scrape episode order? basically, is tmdb helper compatible with episode groups listed on themoviedb?

thanks for your time or anyone else willing to chime in.
Reply
I love the concept of the results from "Last Week" via TMDBHelper > Trakt > Allow TV shows Calendar > Last week, and ideally I wanted to add it to a Node. However, the results have too much bloat for my preference and if it were possible I'd filter without several genres (Talk, Kids, Soap, etc) and keywords (game show, cooking shows, etc), which is not possible with Trakt.

Therefore, I'm trying to emulate "Last Week" using TMDBHelper's Discover UI. Is this possible or am I wasting my time?

1. I'm okay with TMDBHelper returning shows here instead of episodes like Trakt does, but out of curiosity, is it possible to return the episodes instead of shows?

2. I'm using the rule "Air Date After: T-7" to return shows that aired within the last seven days. Am I doing that correctly?

3. It seems like there is no way to sort these results based on last air date using the Discover UI. Is there perhaps a way to do it manually by refining the query parameters in whatever applicable file, which in my case would be a Node JSON file.
Reply
(2024-03-29, 05:10)jurialmunkey Wrote:
(2024-03-28, 20:36)ElmosFunhouse Wrote: Is there a way to add to trakt list using a plugin:// url? I looked through the guide/wiki below and didn't see anything specific regarding adding to list. I'm basically trying to make a "Player" .json file that will take the TMDB info from that process and add it to a trakt list, making a player called "Add to Trakt List". A universal context-menu item with same functionality would solve the same UX "painpoint" I'm trying to alleviate (if possible that way).

Link referenced:
Your guide here

There is already a context menu item on all TMDb Helper items called "Trakt options". From this menu you can add to a list using "Add to user list"

There is no plugin:// folderpath for this command because it is a command, not a folder.

The command to open this menu manually is:

Code:

RunScript(plugin.video.themoviedb.helper,sync_trakt,tmdb_id=1396,tmdb_type=tv,season=1,episode=1,cache_refresh)

But as mentioned above, this already exists in the context menu, so there is no reason to create a player for it.
I also am trying to use tmdb as a means for adding to trakt watchlist. I dont use tmdb to directly watch and only use it as a means to discover media and add it to my watchlist.

I read through the wiki and gave it a shot but it does not show up as a player after i add the json to the correct dir.

Code:
{
    "name": "Add to Trakt Watchlist",
    "plugin": "xbmc.core",
    "priority": 10000,
    "is_resolvable": "false",
    "play_movie": "executebuiltin://RunScript(script.trakt,action=addtowatchlist)"
    "play_episode": "executebuiltin://RunScript(script.trakt,action=addtowatchlist)"
}
Code:
Reply
I also tried this and it does show up as a usable player, but doesnt add to trakt watchlist.

Code:
{
    "name" : "Trakt List TMDB",
    "plugin" : "plugin.video.themoviedb.helper",
    "priority" : 400,
    "is_resolvable" : "false",
    "play_movie" : "plugin://plugin.video.themoviedb.helper,sync_trakt,type=movie,tmdb_id={tmdb}",
    "play_episode" : "plugin://plugin.video.themoviedb.helper,sync_trakt,type=tv,tmdb_id={tmdb},season={season}"
}
Reply
Same official submission request as skin variables please.

Thanks.
Reply
(2024-04-10, 18:30)Hitcher Wrote: Same official submission request as skin variables please.

Thanks.
Hi, is this in response to me? Sorry, I'm learning and ignorant. If it is, I am not sure what you are saying.
Reply
No, it's for jurialmunkey.
Reply
(2024-04-07, 11:20)blakeinthewoods Wrote: I also am trying to use tmdb as a means for adding to trakt watchlist. I dont use tmdb to directly watch and only use it as a means to discover media and add it to my watchlist.

I read through the wiki and gave it a shot but it does not show up as a player after i add the json to the correct dir.

You can add to Watchlist via the Context Menu on any item. I don't understand why a player should be used to do this.

Long press any item > Trakt Options > Add to Watchlist.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
(2024-04-15, 00:36)jurialmunkey Wrote: You can add to Watchlist via the Context Menu on any item. I don't understand why a player should be used to do this.
A single press is much more intuitive for family and friends. In my case a single press to play results in nothing when I don't have the media already in the library, which is most of the time. Setting default action to browse would be good, except that it doesn't bring up the 'add to watchlist' option from the context menu.

I thought that the custom player I posted would do the trick, but it didn't. Thanks for sharing your creation.
Reply
(2024-04-16, 02:48)blakeinthewoods Wrote: I thought that the custom player I posted would do the trick, but it didn't. Thanks for sharing your creation.

I don't know why you thought this would work? Neither command you tried is the one I posted...

This toggles watchlist status using the command I posted. I still think this is a bad approach though as you are asking Kodi to "Play" the command. And it will also be confusing from the user side as it will say "Play with Trakt Watchlist".

json:

{
"name" : "Trakt Watchlist",
"plugin" : "xbmc.core",
"icon" : "{}/resources/icons/trakt/watchlist.png",
"priority" : 10000,
"is_resolvable" : "false",
"assert" : {
"play_movie": ["tmdb"],
"play_episode": ["tmdb"]
},
"play_movie" : "executebuiltin://RunScript(plugin.video.themoviedb.helper,sync_trakt,tmdb_id={tmdb},tmdb_type=movie,sync_type=watchlist)",
"play_episode" : "executebuiltin://RunScript(plugin.video.themoviedb.helper,sync_trakt,tmdb_id={tmdb},tmdb_type=tv,sync_type=watchlist)"
}

Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
I use list Trending Today

Is possible to display only movies that are local & hidden no local ??
Reply
Thank you. I see my mistake, I have MUCH to learn. What would you recommend as an appropriate solution if this is hacky?
Reply
  • 1
  • 81
  • 82
  • 83
  • 84(current)
  • 85

Logout Mark Read Team Forum Stats Members Help
plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners2