Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Plex Media Server scrobbler for trakt.tv

tester22tester22 Posts: 328Members, Plex Pass Plex Pass
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.
«13456765

Comments

  • darciliciousdarcilicious Posts: 529Members, Plex Pass Plex Pass
    tester22 wrote:

    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!)
  • tester22tester22 Posts: 328Members, Plex Pass Plex Pass

    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.
  • darciliciousdarcilicious Posts: 529Members, Plex Pass Plex Pass
    tester22 wrote:

    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 :)
  • darciliciousdarcilicious Posts: 529Members, Plex Pass Plex Pass
    edited December 2011
    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
    
  • tester22tester22 Posts: 328Members, Plex Pass Plex Pass

    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
  • darciliciousdarcilicious Posts: 529Members, Plex Pass Plex Pass
    tester22 wrote:

    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)
  • SlackR84SlackR84 Posts: 110Members, Plex Pass Plex Pass
    edited January 2012
    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?)
  • darciliciousdarcilicious Posts: 529Members, Plex Pass Plex Pass
    SlackR84 wrote:

    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?
  • SlackR84SlackR84 Posts: 110Members, Plex Pass Plex Pass
    edited January 2012
    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.
  • darciliciousdarcilicious Posts: 529Members, Plex Pass Plex Pass
    Excellent, thanks for all that! One last question, do you have 64-bit python installed?
  • SlackR84SlackR84 Posts: 110Members, Plex Pass Plex Pass
    32 bit
  • darciliciousdarcilicious Posts: 529Members, Plex Pass Plex Pass
    SlackR84 wrote:

    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...
  • darciliciousdarcilicious Posts: 529Members, Plex Pass Plex Pass
    edited January 2012
    oh, n/m, working like a charm now :)
  • darciliciousdarcilicious Posts: 529Members, Plex Pass Plex Pass
    Okay, now it's working too well ;)
  • SlackR84SlackR84 Posts: 110Members, Plex Pass Plex Pass
    Think ive figured out git/github.

    I have sent a pull request and also adding fixes as I come across them
  • tester22tester22 Posts: 328Members, Plex Pass Plex Pass
    edited January 2012

    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.
  • kylerwkylerw Posts: 317Members, Plex Pass Plex Pass
    What's the difference between this and the Mac App (http://trakt.tv/downloads/plex)? Does this script work with remote clients?
  • SlackR84SlackR84 Posts: 110Members, Plex Pass Plex Pass
    edited January 2012
    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)
  • darciliciousdarcilicious Posts: 529Members, Plex Pass Plex Pass
    tester22 wrote:

    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 ;)
  • kylerwkylerw Posts: 317Members, Plex Pass Plex Pass
    SlackR84 wrote:

    this monitors the server (and therefore ALL clients connected to it)



    Does this include myPlex shares? I would assume most would agree that behavior would not be desirable... if this is the case, then PERFECT! :-)
«13456765
This discussion has been closed.