Jump to content

Request - Update LastPlayed in Kodi DB


mellomade

Recommended Posts

mellomade

Hi,

 

I am running into some problems with my iOS remote not updating watched status' directly from a database created with the Emby for Kodi add-on.  It works fine if the database is created with Kodi - and I think I have isolated the problem. 

 

Compared to a database created with Kodi - it looks like any time you manually mark a movie/tv episode as watched/unwatched using either the 'W' key on the keyboard OR 'Mark as watched/unwatched' through the context menu - Emby for Kodi will update the playCount but not update the lastPlayed entry with the date/time of the marking.

 

Emby for Kodi will enter this information if you watch a movie/episode all the way through - however it also does not update this info upon the initial sync.  So if a movie/episode is already watched at the time of your sync - this lastPlayed entry is still 'NULL'.

 

This unfortunately is throwing off some feedback that is queried via JSON back to my iOS remote.

 

Is there any way this can be updated when the movies/episodes are manually marked in addition to the playCount?

 

Many thanks!

Edited by mellomade
Link to comment
Share on other sites

mellomade

OK - my bad on the above post - I can see why no one responded.  It doesn't make a lot of sense that the lastPlayed entry could/would have anything to do with marking watched/unwatched.

 

I did do some more digging and found what I think might be the problem.  The remote I am using (Roomie Remote) as 3 different playstates they report.

 

1.  Unwatched - represented by a blue circle icon

2.  Partially watched - represented by a half blue circle icon

3.  Watched - represented by an 'empty' circle icon

 

The watched and unwatched status would be easy if they were reporting just 1 and 3.  But because they are calculating a partial watch - I think the code relies on some function that if the playcount is >0 then they look at the resume state before marking watched (I am still waiting for more than a week from their developers to confirm this).

 

By default when you import a movie into Kodi (no Emby plugin) you can use the following JSON command to get the playcount, lastplayed and resume state:

 

{"jsonrpc":"2.0","method":"VideoLibrary.GetMovies","params":{"properties":["playcount","resume","lastplayed"],"sort":{"order":"ascending","method":"label","ignorearticle":true}},"id":"libMovies"}

 

For example the following movie just imported with an unwatched state reads out like this:

 

{"label":"30 Minutes or Less","lastplayed":"","movieid":953,"playcount”:0,”resume":{"position":0.0,"total":0.0}}

 

When marked as watched via Kodi you get this:

 

{"label":"30 Minutes or Less","lastplayed":"2015-09-25 00:56:27","movieid":953,"playcount”:1,”resume":{"position”:0.0,”total":4983.0}}

 

When you do this same function with Emby for Kodi you get this:

 

{"label":"30 Minutes or Less","lastplayed":"","movieid":953,"playcount”:1,”resume":{"position":0.0,"total":0.0}}

 

You can see that the lastplayed state and the total time for the resume function is missing.

 

I think the problem for this remote is that this 'total' time for the resume function is not being written to the database using the manual marking features in Kodi.  If I actually play the video back about halfway I get the unwatched mark - and the only thing that seems to be changing are the entries for resume and lastplayed.

 

Do you guys have any thoughts on this?  Is this something that can be addressed by the Emby add-on?

 

Many thanks in advance for any assistance you can give!

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...