Kodi Community Forum

Full Version: [RELEASE] trakt.tv tv/movie scrobbler
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here's a teaser from what I'm working on

Image

I think most can figure out what this is for, and shouldn't be long before I'm done.
(2013-05-16, 14:01)elblue Wrote: [ -> ]
Hello, i wanted to ask, what does it mean by "clean trakt episode collection"?
i'm want to know what it does? afraid if i click on it, it will reset my trakt library.

Huh

What it will do is remove items from your Trakt Library if it no longer exists in your XBMC Library, rating and watched data will persist.
(2013-05-16, 17:07)nate1280 Wrote: [ -> ]Here's a teaser from what I'm working on

Image

I think most can figure out what this is for, and shouldn't be long before I'm done.

Looks awesome. Can you tell how it works?
(2013-05-16, 23:07)schumi2004 Wrote: [ -> ]Looks awesome. Can you tell how it works?

I'll be posting more details in the next day or two, it's almost complete and testing is going well.
Hoping this is the right place for this query...I've recently started a full re-watch of the 2003 Battlestar Galactica TV show. Season 0 epsidodes 1 & 2 scrobbled just fine (these are the feature length mini-series episodes) but season 1 always scrobbles from xbmc onto trakt as the 1970's show. I use ember to scrape my shows and movies and all the data for the 2003 series is correct in both ember and on xbmc. As it stands at the moment the only way for me to get correct data to trakt is to disable the plugin and manually checkin via the web or ios app, which is just too much hassle.

Both series are listed on the trakt service so its not as if its finding the only possible match.

Does anyone have any idea where I should begin looking to fix this issue?

Thanks in advance.
(2013-05-13, 15:57)nate1280 Wrote: [ -> ]
(2013-05-13, 07:08)ezechiel1917 Wrote: [ -> ]I'll gladly help you with the tags testing if you decide to start coding it Smile

I was thinking it would sync during normal manual/automatic synchronization, but automatic synchronization at set intervals sounds like pretty good addition for this, as it would improve sync when you rate/add something to watchlist/customlist on the website. for personal rating you could also tag an item directly when you submit rating dialog.

I've already started coding it, getting thoughts and ideas down.

One thing to note, trakt.tv lists can contain seasons and episodes, these will be ignored as they don't support tagging in XBMC. Just movies and tv shows.

This is fantastic, thanks! Is there already a testing version that I can give it a shot? Really looking forward to this feature!!!
(2013-05-17, 13:23)steve1977 Wrote: [ -> ]
(2013-05-13, 15:57)nate1280 Wrote: [ -> ]
(2013-05-13, 07:08)ezechiel1917 Wrote: [ -> ]I'll gladly help you with the tags testing if you decide to start coding it Smile

I was thinking it would sync during normal manual/automatic synchronization, but automatic synchronization at set intervals sounds like pretty good addition for this, as it would improve sync when you rate/add something to watchlist/customlist on the website. for personal rating you could also tag an item directly when you submit rating dialog.

I've already started coding it, getting thoughts and ideas down.

One thing to note, trakt.tv lists can contain seasons and episodes, these will be ignored as they don't support tagging in XBMC. Just movies and tv shows.

This is fantastic, thanks! Is there already a testing version that I can give it a shot? Really looking forward to this feature!!!

I'll be opening a pull request later today or tomorrow if all goes well in today's changes/testing
(removed)
for anyone else who is retarded like me, scrobbling doesn't work til you update your xbmc libraries. Maybe throw that in the install instructions
Nate, is it possible to check the database size or last modification or query it to see if anything was added before launch the sync? Sync after update must be enabled to do this.
Thanks
(2013-05-15, 13:47)jstnnyms Wrote: [ -> ]Whats missing is the sync of tv shows and movies. i've started the addon via programs, some sort of sync dialog started but nothing further happened.

I'm having the exact same issue, scrobbling is working but syncing isn't. I've switched back to the other Traktr plugin I was using before this one and it works fine.
We need logs files to troubleshoot any issues.
rectifyer, can u check my last post above? Is it possible or XBMC does not allow?
(2013-05-18, 14:15)fernandovg Wrote: [ -> ]Nate, is it possible to check the database size or last modification or query it to see if anything was added before launch the sync? Sync after update must be enabled to do this.
Thanks

Nope, can't be done, if a user is using a MySQL DB there's no size to check. Short of creating a cache of sorts to track changes, even then its not much different then now.

Why?
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.