Trakt for MP2 (2 Viewers)

ge2301

Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,725
    3,521
    Stuttgart
    Home Country
    Germany Germany
    @ge2301
    I've added notifications. Do you have an idea how this notification should look like? What infos would you like to show? I currently added just the title, but can add more, just say what would you like to have.
    Actually I have never used Trakt and have no idea about it. I just know that the watched status is for example synced online and it’s the best way if different client softwares are used.
    I even don’t know what scrobble is and how it is triggered. @Alberto83 if you explain once what Trakt can do in MP2, how things are triggered etc. i might have a clearer picture about notifications ;)
     

    aspik

    Retired Team Member
  • Team MediaPortal
  • April 14, 2008
    1,322
    586
    I even don’t know what scrobble is and how it is triggered.
    it's very similar to a recoding action. Each time you start to play a video (series or movie) the plugin contacts the trakt.tv site and sends there info about the played video. On the site you can then see what you're currently watching. For people who are into the social part of the plugin, your friends can see what you're watching and the other way. It also creates a history (visible on the trakt site), so you can see when you actually saw a video. You can make you account private so none of this info will be visible to other people.

    I can imagine following infos based on the trakt response:
    - played/scrobbled title. Like "House of Cards 3x10" for series and "Darkest Hour 2017" for movies,
    - current video progress. Value from 0-100,
    - scrobble action type. Possible values: Start, Pause, Stop or Unspecified,
    - a trakt icon,
    - some visual indicator if the action was a success or failure.

    I don't expect that you create an trakt account. I can prepare a version where you don't need a trakt login. The notification will be displayed each time you start/stop a video.
    Until we wait for the response from ltfearme I'll push my code to my github repo and add you as a collaborator, so can push there.

    @ltfearme
    I guess you're busy with the TV-Shows plugin ;) maybe you could find a minute in the meantime and please add ge2301 as a collaborator? You know better then anyone how much design work this plugin needs and I'm not a designer...
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,725
    3,521
    Stuttgart
    Home Country
    Germany Germany
    Thanks. Now it's much clearer for me. I'm not the social media guy and would never share such things with others. I'd be only interested into keeping the watched flags and perhaps some statistics ;)

    Just a few points I'd like to confirm
    - current video progress. Value from 0-100,
    This would be only used in case of starting or stopping a video, right? Or will be also something send, if I pause a video?

    - some visual indicator if the action was a success or failure.
    Are you sure it can fail in normal cases? Without thinking too much my feeling is, that no indicator is ok in case of failure.
    If a recording e.g. does not start, it also means that just the indicator does not show up.

    I don't expect that you create an trakt account.
    I'll create one. As I understood it's free and can be private :)
     

    aspik

    Retired Team Member
  • Team MediaPortal
  • April 14, 2008
    1,322
    586
    I'd be only interested into keeping the watched flags and perhaps some statistics ;)
    same here :)
    This would be only used in case of starting or stopping a video, right?
    Yes, scrobble happens only in those two cases.
    Are you sure it can fail in normal cases? Without thinking too much my feeling is, that no indicator is ok in case of failure.
    If a recording e.g. does not start, it also means that just the indicator does not show up.
    Trakt can have sometimes problems receiving a message, you're offline or I've send a message which trakt can't process. In those cases I'd like to let know the user, that scrobbling for the video failed. Instead of the video title I would show the error message.
    Some people might not want to show every time they start/stop a video a notification, but would like to know when something bad happened. That's why I added the option "show only on failure".
    Like for the recording action, I've two types of notification: start and stop. Each of the action can be a success or a failure.

    As I understood it's free and can be private :)
    Correct :)
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,584
    3,973
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Some questions on this topic.
    Is there a way do disable scrobbling completely? I don't want this what's the main reason I don't use Trakt.
    Aside that it was impossible to set something as "unwatched" some years ago as I last time tried Trakt. Does this work in meantime?

    If both questions can be answered with "yes" I will start using Trakt again after many years as I now use different systems (MP2 and Kodi) and can sync the watched flags without finishing the tool I've started writing for this purpose...

    Another question... Is it possible to use (or modify) the trakt plugin as (to) some sort of API to read and set watched flags from another tool (that is not Trakt itself)?

    This would be very useful for some of my tools (e.G. MP2-Buddy) as atm I need to manipulate the database directly, something I don't like that much... Possible database damage due to different "collate" systems and the need to stop the MP2 Server before I can write back watched flags is a real disadvantage too...
    An API based on the Trakt plugin would be really great for this as I only need to read and send HTTP requests to the API for manipulating watched flags...
     

    aspik

    Retired Team Member
  • Team MediaPortal
  • April 14, 2008
    1,322
    586
    Is there a way do disable scrobbling completely?
    Yes, the new version has already the option to only enable/disbale srcobble. In the old version you could only completely enable/disable the plugin.
    Aside that it was impossible to set something as "unwatched" some years ago as I last time tried Trakt. Does this work in meantime?
    Should be working. But, I didn't had the time to test all the sync possibilities, that's why I posted a first working version and asked to test it with some test data/account. I'll be grateful for any test result!

    An API based on the Trakt plugin would be really great for this as I only need to read and send HTTP requests to the API for manipulating watched flags...
    Another question... Is it possible to use (or modify) the trakt plugin as (to) some sort of API to read and set watched flags from another tool (that is not Trakt itself)?
    tell me about it... at work I've a colleague who is an angular expert. Currently we're working on a project for a client where I'm developing a REST API backend in java EE and he is working on the frontend. Once we had an idea that a tool like "trakt on premise" would be really cool. As most NAS these days can run docker images and most HTPC users own a NAS, this tool would be delivered as an docker. I'm afraid because of lack of time this tool will never be created, sorry:(
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,725
    3,521
    Stuttgart
    Home Country
    Germany Germany
    @aspik
    I'm quite busy at the moment, but I plan to implement the notification screen in next days.
    For recording it is don like here. The notification template is here, it would also to be created. I think the visibility it set from the model directly, right?

    If you tell me the model and binding parameters I might need, I can right away start when I find time :)
     

    aspik

    Retired Team Member
  • Team MediaPortal
  • April 14, 2008
    1,322
    586
    For recording it is don like here. The notification template is here, it would also to be created.
    I know, in a previous post Brownard already explained it and for trakt I created the same screens and templates.
    I think the visibility it set from the model directly, right?
    Yes.

    If you tell me the model and binding parameters I might need, I can right away start when I find time :)
    I should have tomorrow late night time to add the above mentioned infos to the model. I'll let you know.

    Thanks for accepting my invite! Hopefully ltfearme will also add you.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,725
    3,521
    Stuttgart
    Home Country
    Germany Germany
    I know, in a previous post Brownard already explained it and for trakt I created the same screens and templates.
    Ah oh, I didn’t check it yet. In this case it’s hopefully really straight forward.
     

    aspik

    Retired Team Member
  • Team MediaPortal
  • April 14, 2008
    1,322
    586
    @ge2301
    I've added more properties to the notification to the scrobble notification model. As already said, the scrobble notifications views are implemented similar as the recording notifications.

    I also added an automatic library sync option. If enabled it will be triggered each time a share import is completed. Not sure if this is the best solution, but till now I didn't get any other hints. From what I saw ltfearme is doing an library sync each time the plugin starts and then every 24h.

    @ge2301
    The automatic library sync can also show notifications. You can find the screen for it here. The actually notifications are in the superlayers directory. Which are (again similar to the rec notifications just header texts). With the exception that the failure model has an extra bindable ErrorMessage property.

    For anyone how wants to do some tests, I'm attaching the current version. Any feedback welcome! (I can't post this version in public forum, because it's compatible only with 2.2 builds).
     

    Attachments

    • auto_sync.png
      auto_sync.png
      1.1 MB
    • Trakt_For_MP2.2_v2.7z
      360.8 KB

    Users who are viewing this thread

    Top Bottom