# Plex Media Server scrobbler for trakt.tv

**URL:** <https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [December 31, 2011, 12:06am UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719 "2011-12-31T00:06:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tester22](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@tester22](https://forums.plex.tv/u/tester22)\
**Post date:** [December 31, 2011, 12:06am UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/1 "2011-12-31T00:06:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![darcilicious](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/darcilicious/32/3047_2.png) [@darcilicious](https://forums.plex.tv/u/darcilicious)\
**Post date:** [December 31, 2011, 12:43am UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/2 "2011-12-31T00:43:42Z")

</div>

> [@](#):
>
> It is not finished but works when tested on Mac, iPhone, AppleTv and Samsung Smarthub.  
>   
> 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!)

---

<div class="post-metadata">

**Author:** ![tester22](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@tester22](https://forums.plex.tv/u/tester22)\
**Post date:** [December 31, 2011, 1:00pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/3 "2011-12-31T13:00:02Z")

</div>

> [@](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![darcilicious](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/darcilicious/32/3047_2.png) [@darcilicious](https://forums.plex.tv/u/darcilicious)\
**Post date:** [December 31, 2011, 6:50pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/4 "2011-12-31T18:50:01Z")

</div>

> [@](#):
>
> 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 :)

---

<div class="post-metadata">

**Author:** ![darcilicious](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/darcilicious/32/3047_2.png) [@darcilicious](https://forums.plex.tv/u/darcilicious)\
**Post date:** [December 31, 2011, 7:14pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/5 "2011-12-31T19:14:09Z")

</div>

Okay, get the following error:

```auto

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

```

---

<div class="post-metadata">

**Author:** ![tester22](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@tester22](https://forums.plex.tv/u/tester22)\
**Post date:** [January 1, 2012, 10:26am UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/6 "2012-01-01T10:26:57Z")

</div>

> [@](#):
>
> Okay, get the following error:  
>   
> 
> ```auto
> 
> 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

---

<div class="post-metadata">

**Author:** ![darcilicious](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/darcilicious/32/3047_2.png) [@darcilicious](https://forums.plex.tv/u/darcilicious)\
**Post date:** [January 1, 2012, 5:06pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/7 "2012-01-01T17:06:48Z")

</div>

> [@](#):
>
> 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)

---

<div class="post-metadata">

**Author:** ![SlackR84](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@SlackR84](https://forums.plex.tv/u/SlackR84)\
**Post date:** [January 1, 2012, 11:02pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/8 "2012-01-01T23:02:44Z")

</div>

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?)

---

<div class="post-metadata">

**Author:** ![darcilicious](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/darcilicious/32/3047_2.png) [@darcilicious](https://forums.plex.tv/u/darcilicious)\
**Post date:** [January 1, 2012, 11:08pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/9 "2012-01-01T23:08:33Z")

</div>

> [@](#):
>
> 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?

---

<div class="post-metadata">

**Author:** ![SlackR84](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@SlackR84](https://forums.plex.tv/u/SlackR84)\
**Post date:** [January 1, 2012, 11:19pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/10 "2012-01-01T23:19:50Z")

</div>

Installed python as normal, install easy\_install (part of setuptools, which you can download here - [http://pypi.python.org/pypi/setuptools#files](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.

---

<div class="post-metadata">

**Author:** ![darcilicious](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/darcilicious/32/3047_2.png) [@darcilicious](https://forums.plex.tv/u/darcilicious)\
**Post date:** [January 1, 2012, 11:26pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/11 "2012-01-01T23:26:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SlackR84](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@SlackR84](https://forums.plex.tv/u/SlackR84)\
**Post date:** [January 1, 2012, 11:31pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/12 "2012-01-01T23:31:11Z")

</div>

32 bit

---

<div class="post-metadata">

**Author:** ![darcilicious](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/darcilicious/32/3047_2.png) [@darcilicious](https://forums.plex.tv/u/darcilicious)\
**Post date:** [January 1, 2012, 11:32pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/13 "2012-01-01T23:32:29Z")

</div>

> [@](#):
>
> 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...

---

<div class="post-metadata">

**Author:** ![darcilicious](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/darcilicious/32/3047_2.png) [@darcilicious](https://forums.plex.tv/u/darcilicious)\
**Post date:** [January 2, 2012, 12:21am UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/14 "2012-01-02T00:21:24Z")

</div>

oh, n/m, working like a charm now 🙂

---

<div class="post-metadata">

**Author:** ![darcilicious](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/darcilicious/32/3047_2.png) [@darcilicious](https://forums.plex.tv/u/darcilicious)\
**Post date:** [January 2, 2012, 7:10am UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/15 "2012-01-02T07:10:27Z")

</div>

Okay, now it’s working too well 😉

---

<div class="post-metadata">

**Author:** ![SlackR84](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@SlackR84](https://forums.plex.tv/u/SlackR84)\
**Post date:** [January 2, 2012, 10:47am UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/16 "2012-01-02T10:47:38Z")

</div>

Think ive figured out git/github.  
  
  
  
I have sent a pull request and also adding fixes as I come across them

---

<div class="post-metadata">

**Author:** ![tester22](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@tester22](https://forums.plex.tv/u/tester22)\
**Post date:** [January 3, 2012, 12:58pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/17 "2012-01-03T12:58:29Z")

</div>

> [@](#):
>
> Okay, now it's working too well ;)

  
  
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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 3, 2012, 4:11pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/18 "2012-01-03T16:11:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SlackR84](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@SlackR84](https://forums.plex.tv/u/SlackR84)\
**Post date:** [January 3, 2012, 4:36pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/19 "2012-01-03T16:36:36Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![darcilicious](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/darcilicious/32/3047_2.png) [@darcilicious](https://forums.plex.tv/u/darcilicious)\
**Post date:** [January 3, 2012, 5:40pm UTC](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719/20 "2012-01-03T17:40:22Z")

</div>

> [@](#):
>
> 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.

  
  
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 ;)

[Next page](https://forums.plex.tv/t/plex-media-server-scrobbler-for-trakt-tv/13719.md?page=2)
