• 1
  • 34
  • 35
  • 36(current)
  • 37
  • 38
  • 154
[RELEASE] trakt.tv tv/movie scrobbler
Yep, I added the simulate settings to help debugging, and left them in there for those testing.
(2013-04-30, 23:19)nate1280 Wrote:
(2013-04-30, 22:51)crimsonfury Wrote: But it doesn't sync what I watch in xbmc to Trakt.tv.... I watched a couple episodes last night and a couple movies and then go to Trakt.tv and refresh the page and nothing shows up that I watched... Also it doesn't refresh xbmc with my watched status that updated from Plex to Trakt.tv. So sync for me isn't working.

I have library auto-updated set to work right when I open xbmc and every hour. Then I set trakt to update after every library refresh. I see the popups but the website doesn't show it working...



Also does this work to show "Watching" when a show/movie is in progress and not done?

Try turning off simulated sync if you want it to actually make changes to trakt and vice-versa. The whole point of simulated is to see what it changes without actually making the changes.

As for scrobbling as you're watching, there's nothing in that log file because you uploaded it just after the sync. Would need to see a complete log file to figure out whats going on, if anything (btw, there's also a simulate scrobbling setting)

Ok so will this sync where I leave off with other media centers with Trakt syncing? You say it will show "Watching" on the Trakt site but does that time stamp so I can pickup in the other room or pickup on my tablet with Plex where I left off?
Image
trakt doesn't store timestamps for partially watched items. at least not that I'm aware of.

There is nothing that will synchronize playback states across different media players, again, not that I'm aware of.
(2013-05-01, 01:43)crimsonfury Wrote:
(2013-04-30, 23:19)nate1280 Wrote:
(2013-04-30, 22:51)crimsonfury Wrote: But it doesn't sync what I watch in xbmc to Trakt.tv.... I watched a couple episodes last night and a couple movies and then go to Trakt.tv and refresh the page and nothing shows up that I watched... Also it doesn't refresh xbmc with my watched status that updated from Plex to Trakt.tv. So sync for me isn't working.

I have library auto-updated set to work right when I open xbmc and every hour. Then I set trakt to update after every library refresh. I see the popups but the website doesn't show it working...



Also does this work to show "Watching" when a show/movie is in progress and not done?

Try turning off simulated sync if you want it to actually make changes to trakt and vice-versa. The whole point of simulated is to see what it changes without actually making the changes.

As for scrobbling as you're watching, there's nothing in that log file because you uploaded it just after the sync. Would need to see a complete log file to figure out whats going on, if anything (btw, there's also a simulate scrobbling setting)

Ok so will this sync where I leave off with other media centers with Trakt syncing? You say it will show "Watching" on the Trakt site but does that time stamp so I can pickup in the other room or pickup on my tablet with Plex where I left off?

You have to use a mysql database for that.
For those that like using bleeding edge code, I just submitted a new feature.

This new feature allows you to mark items as watched on trakt.tv when they get marked as watched in XBMC, I've copied information from the pull request and formatted it for the forums below, I've also left out some of the technical stuff, to see that visit the pull request.

Overview:
Since XBMC's python interface does not offer an event that triggers when an item's playcount changes, I decided to add a wrapper around XBMC's built in action ToggleWatched.

Supported Methods:
There is only one way to use this:

Code:
RunScript(script.trakt,action=togglewatched)

Information:
This new action, will ever only work on library items, consider it an extension of the sync features of the trakt script.

Best usage for this, would be to add the following to your keyboard.xml

Code:
<keymap>
  <MyVideoLibrary>
    <keyboard>
      <w>RunScript(script.trakt,action=togglewatched)</w>
    </keyboard>
  </MyVideoLibrary>
</keymap>

This will override XBMC's default action for W causing a ToggleWatched in the video library.

This works on all levels of the video library, movie, show, seasons, and episodes.

When an item or items are successfully marked as watched, a notification will popup indicating this, this can be toggled on/off via a setting.

Since this is an extension of the sync features, it also uses the simulate setting, so if this is enabled, it will do everything but actually update trakt.tv. It will still do XBMC's built in ToggleWatched tho.

Note: this addition only works on library items, it won't be updated to support non-library items due to the amount of data that could potentially need to be passed along, and also, since it essentially wraps around XBMC's built in ToggleWatched action.

I've also added a fix for the BadStatusLine exception that started occuring a few days ago, I might split this out and open a PR of its own for it, have not decided yet.

How it works
  • For movies and episodes, it gets the item's playcount and other relevant data.
  • For seasons, it will get the playcounts of all the items in the selected season, and add episodes to a list if there playcount is 0.
  • For shows, you guessed it, it will get data for all the episodes, and add those episodes whose playcount is 0 to a list.
  • If nothing is going has a playcount of 0, it skips dispatching to the service thread. Otherwise, it dispatches a new action to the scripts service thread with the data gathered above.
  • It will now execute ToggleWatched on the item, so XBMC does its normal thing here.
  • The service thread will take the data it got, and lookup information on trakt and filter out any items that are already watched, and finally, mark those that aren't as watched.
  • If items were watched, and you have notifications enabled, a notification will popup.

Other
As usual, enjoy, and feedback/etc is greatly welcome.
nate1280,

Just curious:
Is this error something with XBMC or Trakt?

Code:
17:03:15 T:3037949952   DEBUG: ------ Window Deinit (/home/pi/.xbmc/addons/script.trakt/resources/skins/Default/720p/RatingDialog.xml) ------
17:03:16 T:2924565568  NOTICE: [trakt] [traktAPI] __getData(): response.read()
17:03:16 T:2924565568  NOTICE: [trakt] [traktAPI] __getData(): Response Code: 200
17:03:16 T:2924565568  NOTICE: [trakt] [traktAPI] __getData(): Response Time: 1149.33 ms
17:03:16 T:2924565568  NOTICE: [trakt] [traktAPI] __getData(): Response Headers: {'content-length': '192', 'x-powered-by': 'PHP/5.3.18-1~dotdeb.0', 'vary': 'Accept-Encoding', 'server': 'nginx/1.2.7', 'connection': 'Close', 'date': 'Wed, 01 May 2013 20:03:12 GMT', 'content-type': 'application/json'}
17:03:16 T:2924565568  NOTICE: [trakt] [traktAPI] traktRequest(): (0) JSON response: '{u'status': u'success', u'rating': 10, u'ratings': {u'loved': 429, u'percentage': 94, u'votes': 434, u'hated': 5}, u'twitter': False, u'tumblr': False, u'facebook': False, u'message': u'rated Spartacus 3x10', u'type': u'episode'}'
17:03:16 T:2924565568  NOTICE: [trakt] [traktAPI] traktRequest(): JSON request was successful.
17:03:16 T:3037949952   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
17:03:16 T:3037949952   ERROR: ClearBlock: Trying to clear non existent block /home/pi/.xbmc/addons/script.trakt
The clearblock? I don't know, I think I looked into it once before and found it happening in other plugins to, and that it was safe to ignore. But this was a while ago.
Thanks.
Rating notification are ok now. No need to change duration as I suggested before.
Has anyone got this add-on working with OpenELEC?

I got invalid username/password the first time so I rebooted and now all I get is "script failed to initialize". Re-installing doesn't seem to help Sad
Try add a delay start (trakt addon settings)
Set the max value and test. If works try others until stop working.
Mine works great on openELEC, I didn't have to add a delay but there were a quite a few others that did.
Image
Setup:
HTPC: Acer Revo 3610 (openELEC 3.0.2) with Aeon Nox (4)
NAS: unRAID 5rc12a on an Intel 3GHz Core2Duo with 4GB of RAM and 5 2TB WD EARS Green Drives
Running: SickBeard, CouchPotato v2, Headphones, Maraschino, Plex and SimplePlugins
(2013-05-02, 20:27)Reginald Wrote: Mine works great on openELEC, I didn't have to add a delay but there were a quite a few others that did.

same here.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Thanks! good to know.
I guess that If you use wireless, needs delay. Wired not.
(2013-05-02, 20:31)fernandovg Wrote: I guess that If you use wireless, needs delay. Wired not.

Ahh, good point! I have wired GB Ethernet. Big Grin
Image
Setup:
HTPC: Acer Revo 3610 (openELEC 3.0.2) with Aeon Nox (4)
NAS: unRAID 5rc12a on an Intel 3GHz Core2Duo with 4GB of RAM and 5 2TB WD EARS Green Drives
Running: SickBeard, CouchPotato v2, Headphones, Maraschino, Plex and SimplePlugins
  • 1
  • 34
  • 35
  • 36(current)
  • 37
  • 38
  • 154

Logout Mark Read Team Forum Stats Members Help
[RELEASE] trakt.tv tv/movie scrobbler13