Skip to content

app_version and app_date are not in Trakt API doc and may raise 400 error #100

@simonc56

Description

@simonc56

Reading official Trakt API documentation : https://trakt.docs.apiary.io/#reference/scrobble/start-watching-in-a-media-center

Payload for /scrobble/start must be in this format :

{
  "movie": {
    "title": "Guardians of the Galaxy",
    "year": 2014,
    "ids": {
      "trakt": 28,
      "slug": "guardians-of-the-galaxy-2014",
      "imdb": "tt2015381",
      "tmdb": 118340
    }
  },
  "progress": 1.25
}

But currently, pytrakt adds app_version and app_date properties.

def scrobble(self, progress, app_version, app_date):
"""Notify trakt that the current user has finished watching a movie.
This commits this :class:`Movie` to the current users profile. You
should use movie/watching prior to calling this method.
:param progress: % progress, integer 0-100. It is recommended to call
the watching API every 15 minutes, then call the scrobble API near
the end of the movie to lock it in.
:param app_version: Version number of the media center, be as specific
as you can including nightly build number, etc. Used to help debug
your plugin.
:param app_date: Build date of the media center. Used to help debug
your plugin.
"""

Those are not in Trakt official documentation.
And they can be null if not populated.
If app_version is null, Trakt API returns 400 error :

{
  "error": "Expected string, received null"
}

Suggestion : to remove those undocumented properties.

Ref:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions