Yesterday, 11:31 PM
(This post was last modified: Yesterday, 11:34 PM by Fingel. Edited 1 time in total.)
Hello!
First off, I love Jellyfin. In fact I love it so much I decided to write my own client, Gelly.
A feature I would like (and that has been requested) is to be able to view the play count for Items. So I took a look at the API and I was happy to see that it appears there is a field in the /Items/ endpoint response which looks like just the ticket:
However, when I actually printed out these values, the numbers seemed off in the low direction. There are songs in my library I know I have listen to (possibly 10s of times!) and yet I don't see a PlayCount greater than 2.
How is this number calculated? One explanation that I can think of is that it's not actually updated automatically. I see there is a POST /UserItems/{itemId}/UserData endpoint. Does this mean clients are meant to explicitly update the playcount themselves? So in the case of badly behaving clients (such as my own) the counts could be totally off?
The other thing I can think of is that it works on some rolling window, though that seems less likely.
Any insight would be appreciated!
First off, I love Jellyfin. In fact I love it so much I decided to write my own client, Gelly.
A feature I would like (and that has been requested) is to be able to view the play count for Items. So I took a look at the API and I was happy to see that it appears there is a field in the /Items/ endpoint response which looks like just the ticket:
Code:
{
"Items": [{
"Name": "string",
...,
"UserData": {
"PlayCount": 0,
...,
}
}]
}However, when I actually printed out these values, the numbers seemed off in the low direction. There are songs in my library I know I have listen to (possibly 10s of times!) and yet I don't see a PlayCount greater than 2.
How is this number calculated? One explanation that I can think of is that it's not actually updated automatically. I see there is a POST /UserItems/{itemId}/UserData endpoint. Does this mean clients are meant to explicitly update the playcount themselves? So in the case of badly behaving clients (such as my own) the counts could be totally off?
The other thing I can think of is that it works on some rolling window, though that seems less likely.
Any insight would be appreciated!


