Giter Club home page Giter Club logo

Comments (3)

XaF avatar XaF commented on June 11, 2024

It seems that Trakt hasn't stored the imdb ID for that show episode. Even if this isn't a bug originating from TraktForVLC, it can be patched by managing the 404 error in cases like that.

from traktforvlc.

hnk avatar hnk commented on June 11, 2024

Now I understand, thanks for clarifying that.
But I do wonder: The show is in trakt itself. So it should be able to correctly scrobble this. I see that the script only sends the imdb id in the json data. Why does it not find the show in trakt?

Sorry, I did not read much into the codebase at all so I have to ask questions like that 😔

from traktforvlc.

XaF avatar XaF commented on June 11, 2024

Usually, trakt.tv uses the information it gets from thetvdb.com to load shows, seasons and episodes. thetvdb.com also gives it the informations on its internal id for the shows, seasons and episodes that trakt.tv is getting, but also the shows, seasons and episodes imdb IDs (For the episode you were watching, here is the data that is available on thetvdb.com).

So, we can see that the imdb ID is rightly referenced (we also saw that TraktForVLC was able to find that ID), as you can verify directly by the URL of that episode on imdb.

I now tried to do the request manually to the trakt.tv api, and it also returned me a 404 error. That error, for the scrobble/start call, means that the element we were trying to scrobble was not found. I thus tried to call that method using the show ID and the season and episode number, and I got that in return along with a 201 return code (meaning it worked):

{
    "action": "start",
    "progress": 7,
    "sharing": {
        "facebook": false,
        "twitter": false,
        "tumblr": false
    },
    "episode": {
        "season": 1,
        "number": 1,
        "title": "Pilot",
        "ids": {
            "trakt": 399481,
            "tvdb": 413862,
            "imdb": "",
            "tmdb": 391090,
            "tvrage": 775469
        }
    },
    "show": {
        "title": "Better Off Ted",
        "year": 2009,
        "ids": {
            "trakt": 7731,
            "slug": "better-off-ted",
            "tvdb": 84021,
            "imdb": "tt1235547",
            "tmdb": 7777,
            "tvrage": null
        }
    }
}

You can thus see, in the "ids" of the "episode" object, that the "imdb" line is blank. It means that trakt.tv hasn't that imdb ID in its database (it has a blank string instead), even if thetvdb.com references it.

It is possible that it's only because the episode hasn't been updated on trakt since the entry on thetvdb has been updated to add the imdb ID. But mostly, it means the bug comes from trakt.tv and not from TraktForVLC. On the other side, the commit 91bda79 was aimed to work for episodes of shows for which we didn't have the imdb ID in thetvdb, so I will probably enhance it to make it work for cases where trakt.tv is not up to date.

from traktforvlc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.