Trakt api not working (1 Viewer)

doskabouter

Development Group
  • Team MediaPortal
  • September 27, 2009
    4,579
    2,967
    Nuenen
    Home Country
    Netherlands Netherlands
    Lately (since sunday at least) I'm getting errors from trakt when watching an episode.
    Code:
    2020-09-22 23:09:49.925 [DEBG] [Scrobble][17]: Address: https://api.trakt.tv/scrobble/stop, Post: {"app_date":"2020-01-01","app_version":"6.0.3.2","progress":99.1,"episode":{"ids":{"slug":null,"trakt":null,"imdb":null,"tmdb":null,"tvdb":null,"tvrage":null},"number":2,"season":2,"title":null},"show":{"ids":{"slug":null,"trakt":null,"imdb":null,"tmdb":null,"tvdb":null,"tvrage":null},"title":"Heroes","year":null}}
    2020-09-22 23:09:50.111 [ERR ] [Scrobble][17]: Protocol Error, Code = '404', Description = 'Not Found', Url = 'https://api.trakt.tv/scrobble/stop', Headers = 'Transfer-Encoding: chunked, Connection: keep-alive, Cf-Railgun: 6de695e055 99.99 0.025591 0030 57da, Referrer-Policy: strict-origin-when-cross-origin, Vary: Accept-Encoding, X-Content-Type-Options: nosniff, X-Download-Options: noopen, X-Frame-Options: SAMEORIGIN, X-Permitted-Cross-Domain-Policies: none, X-Request-Id: a6e54eba-334a-4210-8070-8a41b946f5b9, X-Runtime: 0.014245, X-Xss-Protection: 1; mode=block, CF-Cache-Status: DYNAMIC, cf-request-id: 05593fd51800001ed2b68ec200000001, Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct", CF-RAY: 5d6f026829ee1ed2-AMS, Cache-Control: no-cache, no-store, Content-Type: text/html, Date: Tue, 22 Sep 2020 21:09:52 GMT, Set-Cookie: __cfduid=d0a2e9edf8732aebfa8b37f8e12ecae071600808992; expires=Thu, 22-Oct-20 21:09:52 GMT; path=/; domain=.trakt.tv; HttpOnly; SameSite=Lax, Server: cloudflare'

    It seems that trakt has implemented some cloudflare protection?

    Anyone else having issues with scrobbling?

    Edit: manually setting this episode as watched on the trakt website and restarting mediaportal does show the episode as watched, so the other way around it works.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Hi @doskabouter, are you getting similar errors on other tv shows? From the looks of the post data we're only sending the tv show name, season and episode number (no IDs), perhaps trakt could not find an exact unique match basis that criteria hence the 404.

    Anyway I will check my logs from my HTPC tonight, last night seemed okay from tvseries plugin.
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,579
    2,967
    Nuenen
    Home Country
    Netherlands Netherlands
    Hi @doskabouter, are you getting similar errors on other tv shows? From the looks of the post data we're only sending the tv show name, season and episode number (no IDs), perhaps trakt could not find an exact unique match basis that criteria hence the 404.

    Anyway I will check my logs from my HTPC tonight, last night seemed okay from tvseries plugin.
    You could be right, I do have an entry on the trakt site for monday.
    From the source I use I don't have an id (assuming you mean an imdb-id), and from memory I do fill in the title in the call from oninevideos to trakt, but somehow it isn't used in the post-data to uniquely identify an episode

    Edit: didn't have issues like that for season 1...
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,579
    2,967
    Nuenen
    Home Country
    Netherlands Netherlands
    Did some investigations because I'm still having issues with heroes (and not with other series)
    Getting the watched status always works, when I set it to watched on the site, it is indeed shown as watched in online-videos, so no 404's involved there.

    Also adding the episode title requires an interface change between onlinevidoes and trakt and that could be a serious headache to synchronize.
    Are you confident that adding the episode title will solve this issue?

    And on a side-note: Say that I want to rewatch a series, how would you do that trakt-wise? Is that possible in trakt without losing stats?
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Hey @doskabouter, as you originally suspected I was referring to the show ID like IMDb ID, TVDb ID etc But since you don't have access to it don't worry. Providing episode name is not possible anyway.

    From the websearch I see multiple matches for just "Heroes":

    i.e.

    I suspect the API just does not know which one we want hence the reason to provide an ID...

    Since you don't have access to ID, do you have access to 'Year'? In this case '2006' would be able to provide an exact match on the API.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    And on a side-note: Say that I want to rewatch a series, how would you do that trakt-wise? Is that possible in trakt without losing stats?
    1602291564528.png


    NB: I don't think there is a way to sync this in the tvseries plugin (need to see if there is an API end point for it). We can mark things locally as unwatched and sync that but that's not the same.
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,579
    2,967
    Nuenen
    Home Country
    Netherlands Netherlands
    I do indeed have a year but that's the year of airing (2009 for season 3 f.e.) and maybe not always correct
    Any idea what happens if I provide a wrong year? Will trakt ignore that if it's wrong?

    And resetting is that only per episode? And found out it's only for vip-users...
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Any idea what happens if I provide a wrong year? Will trakt ignore that if it's wrong?
    If the series name, series year, season no, episode uniquely match a single series then it will be successful otherwise it will fail...of course this can still fail if there were two series with the same name and year.

    And found out it's only for vip-users...
    Bugger
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    I'm not sure if this is worth it but we could potentially add a config file which has a mapping for series IDs (either ImdbID, TraktID, TVDbID, TMDbID), so when a plugin that wants to scrobble only has a title or title+year for matching it can use that info to lookup the correct ID basis what the user configures.

    This would be applicable to OnlineVideos and LiveTV(Recording) Plugins.
     

    Users who are viewing this thread

    Top Bottom