Plex Media Server scrobbler for trakt.tv

Still work in progess
There is finally a plugin, read this post for more info: http://forums.plexapp.com/index.php/topic/35626-plex-media-server-scrobbler-for-trakttv/page__view__findpost__p__272585

--- --- ---

It is not finished but works when tested on Mac, iPhone, AppleTv and Samsung Smarthub.

Download the code here: https://github.com/tester22/Plex-Trakt-Scrobbler
Rename the config file to config.ini and add your username and password.

Launch the script using python script.py

There are still a lot of of bugs so consider this a "proof of concept".

Forgot to mention, the code need to be runned on the machine that have PMS installed.
Have tested the code on OSX and probably works in Linux too but it is not tested.


Any chance that someone could make this work on Windows? I love the trakt scrobbler for Boxee Box that runs on Windows and would love the same for PMS...

(I'd be very happy to test!)


Might work if you have python installed on your windows machine (need to be the same machine that is running Plex Media Server.
And you need to change line 24: https://github.com/tester22/Plex-Trakt-Scrobbler/blob/master/script.py#L24
So that it points to your log file, see: http://wiki.plexapp.com/index.php/PlexNine_PMS_TipsTricks#Windows

I don't have access to any computer with Windows so can't test it or give you any feedback regarding windows issues.


Oh, that's seems quite do-able :) Python already installed for the Boxee Box scrobbler, let me know see how it goes and I'll report back soon-ish :)

Okay, get the following error:



Traceback (most recent call last):<br />
  File "C:\Users\xxx\TraktTV	ester22-Plex-Trakt-Scrobbler-b28e56a\scriptWindows<br />
.py", line 7, in <module><br />
    from elementtree.ElementTree import parse, tostring<br />
ImportError: No module named elementtree.ElementTree



You need elementtree.
Type this at your terminal: easy_install elementtree


Stymied at the moment. There's a [windows installer](http://effbot.org/downloads/#elementtree) for elementtree but it won't install, even though I have [successfully registered](http://effbot.org/zone/python-register.htm) my python installation/environment (and rebooted just to make sure).

(Getting easy_install installed on windows looks like an even more daunting task)

Works on Windows for me.



Hardcoded the values, I will make it it universal tomorrow. Just need to work out github and I will submit a merge request (I think thats the right term?)



That's great news -- how did you install Python and elementtree?

Installed python as normal, install easy_install (part of setuptools, which you can download here - http://pypi.python.org/pypi/setuptools#files)



Make sure to add the python folder and the python\scripts folder are in your PATH environment variable. i.e. C:\Python27;C:\Python27\Scripts and reboot.



Used easy_install to install elementtree and simplejson



Windows support will require ‘easy_install winpaths’ too, as python isnt my thing and it was an easy way to do what I wanted.



I have windows path working dynamically now, but if I leave the mac path uncommented, it refuses to run. Just need to fix that, then I will put back onto github for the op to merge if he sees fit.

Excellent, thanks for all that! One last question, do you have 64-bit python installed?

32 bit



thanks, i'll try the above with my current install (64-bit i think) and if that doesn't work, switch to 32-bit...

oh, n/m, working like a charm now :slight_smile:

Okay, now it’s working too well :wink:

Think ive figured out git/github.



I have sent a pull request and also adding fixes as I come across them



Works for me http://trakt.tv/user/tester22/history, have solved that bug. Now it will only scrobble once for each item that is played.
I am planing to rewrite this into a real Plex plugin when I have time. Right now I am only using it to try out if the main logic is working.

What’s the difference between this and the Mac App (http://trakt.tv/downloads/plex)? Does this script work with remote clients?

Works on Windows, Mac OSX + Linux, will be made into a proper Plex plugin - rather than a separate app/script.



It also works on all clients connected to the server. The app you linked seems to monitor the client, this monitors the server (and therefore ALL clients connected to it)



Awesome, thanks so much for your work on this :) Definitely looking forward to the plugin version :) Will let you know if anything else pops up problem-wise ;)