Plex Media Server scrobbler for trakt.tv




If you have that version I would suggest that you try:
ipkg install py26-setuptools
easy_install elementtree


it was indeed multiple version.
I finaly got teh script to work with python 2.5 instead of 2.6 ( couldnt get elementtree to work)

Then i just had to change path to the logs and it's working.

Thanks !

What log parh was it on the Synology?



/volume1/Plex/Library/Logs/Plex Media Server.log


Thanks, will check if a logfile exists at that path during startup, so that Synology users won't need to specify the log.

This is a great script and I see on GitHub you are working on the plugin version but can you fix the bug where it doesnt scrobble if you pause whilst watching. I have watched a few things with this turned on and if I don’t pause it scribbles perfectly and the episode is set as watched, if I pause I am left with watching status for a while after its finished but it never scrobbles the finish event.

I have the same error for Ubuntu 10.04 64bit.



python script.py

Traceback (most recent call last):

File “script.py”, line 7, in

from elementtree.ElementTree import parse, tostring

ImportError: No module named elementtree.ElementTree



I tried to install elementtree from the repositories and it said its already installed and the latest version too.



Keep up the great work though, I have been hoping for something like this for a few months! Thanks for all your work.



Try to install it with easy_install otherwise you need to wait since SlackR84 is working on changing the code so it uses lxml instead of elementtree.


What client are you using? My main client is Samsung Smarthub and there I haven't experienced any problem. It is quite hard to fix the bug if it is like you described it because there is no easy way to check what plex is playing.
I am solving that by tracing the logfile for certain kind of log messages to parse from them. I think the iOS clients (including AppleTV) is buffering as much as possible in the background so that could be the reason why I'am not detecting any updates.

Starting work on lxml tomorrow. Hopefully have something working by Monday.

Looking forward to the plugin version!



Thanks for the help. I didn't realize easy_install worked on Ubuntu as well. However, it can't seem to find the package when I try easy_install elementtree. No worries though, I will wait for the lxml version! Thanks for your help.

Why do I get this error?



Traceback (most recent call last):<br />
  File "script.py", line 54, in <module><br />
    data = parse(urllib2.urlopen(url)).getroot()<br />
  File "C:\Python27\lib\urllib2.py", line 126, in urlopen<br />
    return _opener.open(url, data, timeout)<br />
  File "C:\Python27\lib\urllib2.py", line 394, in open<br />
    response = self._open(req, data)<br />
  File "C:\Python27\lib\urllib2.py", line 412, in _open<br />
    '_open', req)<br />
  File "C:\Python27\lib\urllib2.py", line 372, in _call_chain<br />
    result = func(*args)<br />
  File "C:\Python27\lib\urllib2.py", line 1199, in http_open<br />
    return self.do_open(httplib.HTTPConnection, req)<br />
  File "C:\Python27\lib\urllib2.py", line 1174, in do_open<br />
    raise URLError(err)<br />
urllib2.URLError: <urlopen error [Errno 10061] No connection could be made becau<br />
se the target machine actively refused it>



Tried everything now almost


What os? And are you running this at the same machine as the PMS? Have you changed port in PMS? What version of PMS?

OMG, I'm stupid. Forgot to run PMS first.. NOW IT WORKS! :)

Know anything about when the plugin will be done btw?


When I have time, help out if you like I have added the issues to Github.


Added elementtree and simplejson to the repo so should work without any aditional modules.

it worked perfectly, until i started added home movies. now i get this error and it stops





Found the movie Michael & Francesca Wedding Jan 19 2008 from 2008, lets make a call to trakt.tv<br />
<br />
Traceback (most recent call last):<br />
  File "/Users/michael/_xbmc/traktScrobbler/script.py", line 193, in <module><br />
    add_to_trakt(type, title, year, int(float(duration)/60000), percent, guid)<br />
  File "/Users/michael/_xbmc/traktScrobbler/script.py", line 126, in add_to_trakt<br />
    imdb_id = m.group(1)<br />
AttributeError: 'NoneType' object has no attribute 'group'<br />
logout<br />





Yes, known bug, see: https://github.com/tester22/Plex-Trakt-Scrobbler/issues/8


Thanks, it starts now! However I get this error. It is able to figure out what I am watching, (but always says 0%) and then I get this error.


trakt.tv username *******

Progress on 13642 is 432330 ms

percent 0

Found the episode Anthropology 101 from 2010, lets make a call to trakt.tv

Make a call with this data: username=*********&password=**************************************&media_center_version=0.9.5.2-7a18da4&plugin_version=0.2&title=Anthropology+101&year=2010&duration=21&progress=34.0&season=2&tvdb_id=94571&episode=1

Traceback (most recent call last):
File "script.py", line 193, in
add_to_trakt(type, title, year, int(float(duration)/60000), percent, guid)
File "script.py", line 135, in add_to_trakt
result = urllib2.urlopen(req)
File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.6/urllib2.py", line 391, in open
response = self._open(req, data)
File "/usr/lib/python2.6/urllib2.py", line 409, in _open
'_open', req)
File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib/python2.6/urllib2.py", line 1161, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.6/urllib2.py", line 1136, in do_open
raise URLError(err)
urllib2.URLError: