Jump to content

Is there something like a movie-view-count in Emby?


Recommended Posts

Sludge Vohaul
Posted

Hi,

 

Is there a way in the (Web-)UI to see how many times a movie (any item) has been watched? I am only aware of the watched/unwatched toggle.

 

Thanks,

sv

Posted

no, it's in the database but not displayed anywhere.

Sludge Vohaul
Posted

@@Luke

 

thanks. Is there a way to set this infomation programmatically via the API?

Posted

userdata.playcount. i'll have to check if we have a method to update the full userdata object. we might not.

Happy2Play
Posted

Couldn't this just be intregrated into Reports?

Posted

Couldn't this just be intregrated into Reports?

Or @@reggi's STATISTICS plugin?

Sludge Vohaul
Posted (edited)

Referring to #4 it is surprisingly simple:

A movie's user metadata (the whole UserItemDataDto like PlayCount, Played (which is IMO a redundant piece of information), LastPlayedDate, IsFavorite, ...) can all be set via BaseItemDto.UserData

 

Edit:

This is all wrong. The values in BaseItemDto.UserData are (all?) read-only. Changes are not processed on the server-side.

Edited by Sludge Vohaul
Posted

Played is not redundant, that indicates if the user has ever completed it to the end and therefore should be indicated as played.

  • Like 1
Posted (edited)

Also, playcount can be deceiving.. if the person uses a resume point to continue watching, this will increase the playcount.

 

What should happen is if a resume point is used to play, IMO, this shouldn't increase the playcount, but should affect both played and last played when applicaple.

 

Not sure how plex handles resume, does it also count as a playcount increment too?

 

Sent from my Nexus 7 using Tapatalk

Edited by speechles
Posted

I don't think it matters what they do. That's their api, this is ours. I think what we are doing now makes the most sense.

 

An example would be, logically if you increment LastPlayedDate you should also increment PlayCount. So if we don't increment either and now you go and sort videos by last played, well now the thing i just watched a portion of is not at the beginning of the list like you would expect.

Posted (edited)

I meant, suppose you sort by playcount. Now the pirates of the caribbean movie you had to stop and resume 9x because of interruptions. Since you are new-ish to emby, now that movie is highest populated on the "sort by playcount" because it was watched once, yet playcount shows 9. Is this a misconception that playcount = amount of times watched. Because if it is, this explains this disparity. If it isn't well, then resume should alter lastplayed but not play count. Thats the part I meant was deceiving.

 

The part about plex, only matters to see how playcount is related across platforms. Since this is about possibly porting a tool that allows plex data to become emby data it is relevant. The two need symbiosis here to acheive easy migration.

 

Sent from my Nexus 7 using Tapatalk

Edited by speechles
Posted

I meant, suppose you sort by playcount. Now the pirates of the caribbean movie you had to stop and resume 9x because of interruptions. Since you are new-ish to emby, now that movie is highest populated on the "sort by playcount" because it was watched once, yet playcount shows 9. Is this a misconception that playcount = amount of times watched. Because if it is, this explains this disparity. If it isn't well, then resume should alter lastplayed but not play count. Thats the part I meant was deceiving.

 

Take the same example and make it a concert DVD you always jump into chapters on.  Or, your favorite movie that you always skip past the opening scene/credits on.

 

The way we do does make the most sense.  If you re-started that item 9 times then you "played" it 9 times.  There really isn't any way to track the number of times you watched it from beginning to end nor is that necessarily all that useful.  However, since most of our apps have automatic failure detection and retry, this played count is probably never going to be exactly what you expect anyway.

 

Of course, this whole discussion is somewhat moot since we don't display this value anywhere at this time anyway :)

Sludge Vohaul
Posted

Just to follow up #4 and #7.

 

Setting the status of a movie to Watched" needs to be done via the 

 

Users/{userid}/PlayedItems/{movieid}?DatePlayed=yyyyMMddHHmmss

 

POST request. This internally sets Played=true increases the PlayCount by 1 and sets LastDatePlayed=yyyyMMddHHmmss

 

 

Setting the status to "Unwatched" is done via the 

 

Users/{userid}/PlayedItems/{movieid}

 

DELETE request. This sets Played=false, PlayCount=0 and resets LastDatePlayed.

 

 

So, if one wants to set the status to "Watched" with PlayCount=5, one needs to submit the DELETE request first (to set PlayCount=0) and then submit the POST request 5 times.

 

Posted

Yea i guess we don't currently have an api to set just the count. Haven't needed it up to this point.

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...