Jump to content

PlayedPercentage not shown when browsing TV Shows via API


ohmadruga

Recommended Posts

ohmadruga

I'm struggling to get PlayedPercentage information from my Series using the following endpoint:

/Users/{UserId}/Items?Recursive=true&IncludeItemTypes=Series

For all shows returned by this query I can see that UserData is present, but it lacks the PlayedPercentage attribute:

    "UserData": {
        "UnplayedItemCount": 4,
        "PlaybackPositionTicks": 0,
        "PlayCount": 0,
        "IsFavorite": false,
        "Played": false
    },

If I query a specific TV Series using:

/Users/{UserId}/Items/{ItemId}/

It brings me the PlayedPercentage information:

    "UserData": {
        "PlayedPercentage": 33.33333333333334,
        "UnplayedItemCount": 4,
        "PlaybackPositionTicks": 0,
        "PlayCount": 0,
        "IsFavorite": false,
        "Played": false
    },

I've checked that when browsing Movies or Episodes, both endpoints return the PlayedPercentage attribute, so I think it is something related to TV Shows/Series only.

Link to comment
Share on other sites

  • 2 weeks later...

Hi, yes this is inconsistent. We should probably remove it altogether from folder items.

It was removed some time ago as an optimization because Emby apps don't use it and it requires database queries for every single item in the list. When you request a single item we happen to have all of that information already so that's why you end up getting it there.

If you must have this, then currently I can see that requesting the field RecursiveItemCount will result in this getting populated, which will make queries slower and it's not intuitive so I can't promise it will stay that way forever.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...