[RELEASE] trakt.tv tv/movie scrobbler
So, I just submitted my latest changes as a pull request, which some of you have probably been waiting for (or testing).

But first, a thanks to ezechiel1917 for help testing during initial development, and ideas/feedback.

Tagging/List support!

Overview:
With this new feature, you'll now be able to create tags from your trakt.tv Lists, Watchlists, as well as Ratings (Watchlists and Ratings are enabled by a setting).

You can edit what lists an item belongs to directly within XBMC, and add new lists this item belongs to.

You'll also be able to fully edit your trakt.tv lists within XBMC, selecting items from your XBMC library. As well as edit details about the list, like its description, privacy settings, allow shouts and numbering. You can also rename a list.

There is also custom script/skin support for directly adding or removing items from lists.

When a movie is scrobbled, if you have watchlists enabled, and the move you've just watched happens to be in your watchlist, it will automatically remove the tag so you don't need to force an updatetags to re-sync your tags.

When you rate a movie or show, and you have ratings tags enabled, it will also update the rating tags, either removing (if unrate, or new rating is lower then minimum), or adding new rating tags, again so you don't have to force a re-sync.

Notes:
  • All tags create by this feature, are prefixed with "trakt.tv - " to differentiate them from any other tags you might have in your library.
  • All tagging actions will preserve any existing tags, it will only manipulate trakt.tv specific tags.
  • updatetags sync is a one way sync, from trakt.tv to XBMC
  • managelists can be used to to do manual 2-way updates within XBMC.

Supported Methods:
There are 5 new actions added with this feature, they are as follows:

Code:
RunScript(script.trakt,action=updatetags)
RunScript(script.trakt,action=managelists)
RunScript(script.trakt,action=itemlists[,media_type=<movie|show>,dbid=#])
RunScript(script.trakt,action=addtolist,list=<listname>[,media_type=<movie|show>,dbid=#])
RunScript(script.trakt,action=removefromlist,list=<listname>[,media_type=<movie|show>,dbid=#])

The actions itemlists, addtolist and removefromlist have optional parameters of media_type and dbid, these can be used (just like the rating actions) to act against a specific library item. Without these parameters, the currently selected item will be used.

updatetags can also be configured to run after a library sync, in tagging settings.

I have also added a temporary timertest action, this can be manually run from the Debug settings, or tied to a keyboard action like any others. Alls this action does, is times various JSON requests with/without tags and different ways lists are built. This was used to get a general idea of how long specific functions might have taken to load. If you do run this, the data will be in your log file, and I wouldn't mind seeing this information, send me a PM with it plus specs of the machine it was run on and whether you're using the internal SQLite DBs or a MySQL server (and what its running on). It will probably be removed before a merge happens (if it does). This is just for statistics gathering, to see how various calls behave.

Information:
This feature can only work with library items, specifically only movies and shows. Even tho trakt.tv lists can have seasons and episodes in them, these 2 items do not have tagging support within XBMC so any items like these are ignored and left untouched in your lists.

Here is a sample keyboard setting for all function, you can set them up how ever you choose.

Code:
<keymap>
  <MyVideoLibrary>
    <keyboard>
      <t>RunScript(script.trakt,action=updatetags)</t>
      <y>RunScript(script.trakt,action=itemlists)</y>
      <t mod="alt">RunScript(script.trakt,action=addtolist,list=Watchlist)</t>
      <y mod="alt">RunScript(script.trakt,action=removefromlist,list=Watchlist)</y>
      <u>RunScript(script.trakt,action=managelists)</u>
    </keyboard>
  </MyVideoLibrary>
</keymap>

Screenshots
itemlists dialog:
Image

managelists dialog, showing your trakt.tv lists.
Image

managelists dialog, showing movie/tv show selection, and parent folder, and editing options.
Image

managelists dialog, showing your movies, with the ability to toggle selection for addition/removal from list.
Image

I'll update the original post once/if it gets merged in.
Other
I believe I've explained everything as best as I can, probably left some things out, so I may update this with new/more information later.
As usual, enjoy, and feedback/etc is greatly welcome, and this needs testing before it can be merged into the plugin.
Intel i3 NUC | Windows 8.1 | Kodi Helix | Arctic: Zephyr


Messages In This Thread
RE: [RELEASE] trakt.tv tv/movie scrobbler - by nate1280 - 2013-05-20, 16:22
Logout Mark Read Team Forum Stats Members Help
[RELEASE] trakt.tv tv/movie scrobbler13