Sludge Vohaul 23 Posted October 1, 2017 Posted October 1, 2017 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
Luke 42080 Posted October 1, 2017 Posted October 1, 2017 no, it's in the database but not displayed anywhere.
Sludge Vohaul 23 Posted October 3, 2017 Author Posted October 3, 2017 @@Luke thanks. Is there a way to set this infomation programmatically via the API?
Luke 42080 Posted October 3, 2017 Posted October 3, 2017 userdata.playcount. i'll have to check if we have a method to update the full userdata object. we might not.
Happy2Play 9782 Posted October 3, 2017 Posted October 3, 2017 Couldn't this just be intregrated into Reports?
CBers 7451 Posted October 3, 2017 Posted October 3, 2017 Couldn't this just be intregrated into Reports? Or @@reggi's STATISTICS plugin?
Sludge Vohaul 23 Posted October 4, 2017 Author Posted October 4, 2017 (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 October 5, 2017 by Sludge Vohaul
Luke 42080 Posted October 4, 2017 Posted October 4, 2017 Played is not redundant, that indicates if the user has ever completed it to the end and therefore should be indicated as played. 1
speechles 2055 Posted October 4, 2017 Posted October 4, 2017 (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 October 4, 2017 by speechles
Luke 42080 Posted October 4, 2017 Posted October 4, 2017 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.
speechles 2055 Posted October 4, 2017 Posted October 4, 2017 (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 October 4, 2017 by speechles
ebr 16185 Posted October 4, 2017 Posted October 4, 2017 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 23 Posted October 5, 2017 Author Posted October 5, 2017 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.
Luke 42080 Posted October 5, 2017 Posted October 5, 2017 Yea i guess we don't currently have an api to set just the count. Haven't needed it up to this point.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now