Jump to content


Photo

Plex Media Server scrobbler for trakt.tv


  • Please log in to reply
1302 replies to this topic

#1 tester22

tester22

    Dedicated Member

  • Members
  • PipPipPip
  • 327 posts
  • Location: Stockholm

Posted 31 December 2011 - 12:06 AM

There is finally a plugin, read this post for more info: http://forums.plexap...post__p__272585

--- --- ---

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

Download the code here: https://github.com/t...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.

Edited by tester22, 02 July 2012 - 06:38 AM.

watched-fanart.jpg

#2 darcilicious

darcilicious

    Dedicated Member

  • Members
  • PipPipPip
  • 435 posts

Posted 31 December 2011 - 12:43 AM

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

Plex Media Server v0.9.8.18 / HP Touchsmart 600-1105xt / HP MediaSmart EX490 WHS w/12TB
PlexPass / Plex Home Theater v1.0.7 / Plex for Windows 8 v1.6.0.5 / TouchSmart Envy 23-d160qd / HP Media Center 8400F  
Sonos Play:3, Connect / Simple.TV / Roku 2 XS+Plex / iPhone 5 / iPad 4


#3 tester22

tester22

    Dedicated Member

  • Members
  • PipPipPip
  • 327 posts
  • Location: Stockholm

Posted 31 December 2011 - 01:00 PM

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/t...r/script.py#L24
So that it points to your log file, see: http://wiki.plexapp....sTricks#Windows

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

#4 darcilicious

darcilicious

    Dedicated Member

  • Members
  • PipPipPip
  • 435 posts

Posted 31 December 2011 - 06:50 PM

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/t...r/script.py#L24
So that it points to your log file, see: http://wiki.plexapp....sTricks#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 :)

Plex Media Server v0.9.8.18 / HP Touchsmart 600-1105xt / HP MediaSmart EX490 WHS w/12TB
PlexPass / Plex Home Theater v1.0.7 / Plex for Windows 8 v1.6.0.5 / TouchSmart Envy 23-d160qd / HP Media Center 8400F  
Sonos Play:3, Connect / Simple.TV / Roku 2 XS+Plex / iPhone 5 / iPad 4


#5 darcilicious

darcilicious

    Dedicated Member

  • Members
  • PipPipPip
  • 435 posts

Posted 31 December 2011 - 07:14 PM

Okay, get the following error:

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

Plex Media Server v0.9.8.18 / HP Touchsmart 600-1105xt / HP MediaSmart EX490 WHS w/12TB
PlexPass / Plex Home Theater v1.0.7 / Plex for Windows 8 v1.6.0.5 / TouchSmart Envy 23-d160qd / HP Media Center 8400F  
Sonos Play:3, Connect / Simple.TV / Roku 2 XS+Plex / iPhone 5 / iPad 4


#6 tester22

tester22

    Dedicated Member

  • Members
  • PipPipPip
  • 327 posts
  • Location: Stockholm

Posted 01 January 2012 - 10:26 AM

Okay, get the following error:

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


You need elementtree.
Type this at your terminal: easy_install elementtree
watched-fanart.jpg

#7 darcilicious

darcilicious

    Dedicated Member

  • Members
  • PipPipPip
  • 435 posts

Posted 01 January 2012 - 05:06 PM

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


Stymied at the moment. There's a windows installer for elementtree but it won't install, even though I have successfully registered my python installation/environment (and rebooted just to make sure).

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

Plex Media Server v0.9.8.18 / HP Touchsmart 600-1105xt / HP MediaSmart EX490 WHS w/12TB
PlexPass / Plex Home Theater v1.0.7 / Plex for Windows 8 v1.6.0.5 / TouchSmart Envy 23-d160qd / HP Media Center 8400F  
Sonos Play:3, Connect / Simple.TV / Roku 2 XS+Plex / iPhone 5 / iPad 4


#8 SlackR84

SlackR84

    Member

  • Members
  • PipPip
  • 85 posts

Posted 01 January 2012 - 11:02 PM

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

#9 darcilicious

darcilicious

    Dedicated Member

  • Members
  • PipPipPip
  • 435 posts

Posted 01 January 2012 - 11:08 PM

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?

Plex Media Server v0.9.8.18 / HP Touchsmart 600-1105xt / HP MediaSmart EX490 WHS w/12TB
PlexPass / Plex Home Theater v1.0.7 / Plex for Windows 8 v1.6.0.5 / TouchSmart Envy 23-d160qd / HP Media Center 8400F  
Sonos Play:3, Connect / Simple.TV / Roku 2 XS+Plex / iPhone 5 / iPad 4


#10 SlackR84

SlackR84

    Member

  • Members
  • PipPip
  • 85 posts

Posted 01 January 2012 - 11:19 PM

Installed python as normal, install easy_install (part of setuptools, which you can download here - http://pypi.python.o...etuptools#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.

#11 darcilicious

darcilicious

    Dedicated Member

  • Members
  • PipPipPip
  • 435 posts

Posted 01 January 2012 - 11:26 PM

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

Plex Media Server v0.9.8.18 / HP Touchsmart 600-1105xt / HP MediaSmart EX490 WHS w/12TB
PlexPass / Plex Home Theater v1.0.7 / Plex for Windows 8 v1.6.0.5 / TouchSmart Envy 23-d160qd / HP Media Center 8400F  
Sonos Play:3, Connect / Simple.TV / Roku 2 XS+Plex / iPhone 5 / iPad 4


#12 SlackR84

SlackR84

    Member

  • Members
  • PipPip
  • 85 posts

Posted 01 January 2012 - 11:31 PM

32 bit

#13 darcilicious

darcilicious

    Dedicated Member

  • Members
  • PipPipPip
  • 435 posts

Posted 01 January 2012 - 11:32 PM

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

Plex Media Server v0.9.8.18 / HP Touchsmart 600-1105xt / HP MediaSmart EX490 WHS w/12TB
PlexPass / Plex Home Theater v1.0.7 / Plex for Windows 8 v1.6.0.5 / TouchSmart Envy 23-d160qd / HP Media Center 8400F  
Sonos Play:3, Connect / Simple.TV / Roku 2 XS+Plex / iPhone 5 / iPad 4


#14 darcilicious

darcilicious

    Dedicated Member

  • Members
  • PipPipPip
  • 435 posts

Posted 02 January 2012 - 12:21 AM

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

Plex Media Server v0.9.8.18 / HP Touchsmart 600-1105xt / HP MediaSmart EX490 WHS w/12TB
PlexPass / Plex Home Theater v1.0.7 / Plex for Windows 8 v1.6.0.5 / TouchSmart Envy 23-d160qd / HP Media Center 8400F  
Sonos Play:3, Connect / Simple.TV / Roku 2 XS+Plex / iPhone 5 / iPad 4


#15 darcilicious

darcilicious

    Dedicated Member

  • Members
  • PipPipPip
  • 435 posts

Posted 02 January 2012 - 07:10 AM

Okay, now it's working too well ;)

Attached Files


Plex Media Server v0.9.8.18 / HP Touchsmart 600-1105xt / HP MediaSmart EX490 WHS w/12TB
PlexPass / Plex Home Theater v1.0.7 / Plex for Windows 8 v1.6.0.5 / TouchSmart Envy 23-d160qd / HP Media Center 8400F  
Sonos Play:3, Connect / Simple.TV / Roku 2 XS+Plex / iPhone 5 / iPad 4


#16 SlackR84

SlackR84

    Member

  • Members
  • PipPip
  • 85 posts

Posted 02 January 2012 - 10:47 AM

Think ive figured out git/github.

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

#17 tester22

tester22

    Dedicated Member

  • Members
  • PipPipPip
  • 327 posts
  • Location: Stockholm

Posted 03 January 2012 - 12:58 PM

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.
watched-fanart.jpg

#18 dirRtyjoe

dirRtyjoe

    Dedicated Member

  • Members
  • PipPipPip
  • 309 posts

Posted 03 January 2012 - 04:11 PM

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

#19 SlackR84

SlackR84

    Member

  • Members
  • PipPip
  • 85 posts

Posted 03 January 2012 - 04:36 PM

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)

#20 darcilicious

darcilicious

    Dedicated Member

  • Members
  • PipPipPip
  • 435 posts

Posted 03 January 2012 - 05:40 PM

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

Plex Media Server v0.9.8.18 / HP Touchsmart 600-1105xt / HP MediaSmart EX490 WHS w/12TB
PlexPass / Plex Home Theater v1.0.7 / Plex for Windows 8 v1.6.0.5 / TouchSmart Envy 23-d160qd / HP Media Center 8400F  
Sonos Play:3, Connect / Simple.TV / Roku 2 XS+Plex / iPhone 5 / iPad 4





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users