Jump to content

Missing 'lastPlayedDate' when running Emby server beta


justmeyep

Recommended Posts

justmeyep

Hello,

I noticed, that the lastPlayedDate seems to get messed up when running the latest beta release (currently 4.8.0.39 beta). I am not sure with which beta this was introduced, it does not happen with the latest stable build.

The first response is one received running the Emby beta build.

The second one is a response received running the Emby release build.

The important parts have been highlighted, I hope this helps and it can be resolved before the next stable release. 🙃

 
(body: [ (Name: Grandmaster), (ServerId: c6b7709567ff4b6c9d41ceecc1fbd899), (Id: 65), (DateCreated: 2023-05-23T19:11:24.0000000Z), (PremiereDate: 2014-04-30T00:00:00.0000000Z), (Path: /data/drive/media/anime/No Game, No Life/Season 1/No Game, No Life - S01E04 - Grandmaster Bluray-1080p [Lulu].mkv), (RunTimeTicks: 14416310000), (ProductionYear: 2014), (IndexNumber: 4), (ParentIndexNumber: 1), (ProviderIds: [ (Tvdb: 4845979) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 0), (IsFavorite: false), (Played: true) ]), (SeriesName: No Game, No Life), (SeriesId: 8), (SeasonId: 61), (SeriesPrimaryImageTag: e4addc367f43018cfca5d0af59aaed21), (SeasonName: Season 1), (MediaType: Video) ]) } (edited)
 
(body: [ (Name: Reconnected Feelings), (ServerId: 22a3d533da5744e2b2bf760b8a88bbdd), (Id: 271699), (DateCreated: 2020-11-27T06:11:26.0000000Z), (PremiereDate: 2020-09-04T21:00:00.0000000Z), (Path: /storage/media/anime/Major 2nd (2018)/Season 02/Major 2nd (2018) - S02E16 - [041] Reconnected Feelings [WEBDL-1080p] [JA] [x264 AAC 8bit].mkv), (RunTimeTicks: 14700780000), (ProductionYear: 2020), (IndexNumber: 16), (ParentIndexNumber: 2), (ProviderIds: [ (Tvdb: 7901572) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 1), (IsFavorite: false), (LastPlayedDate: 2022-02-28T18:14:42.0000000Z), (Played: true) ]), (SeriesName: Major 2nd), (SeriesId: 259045), (SeasonId: 271655), (SeriesPrimaryImageTag: 395f07cc2f7e249f20c70d640f9bde16), (SeasonName: Season 2), (MediaType: Video) ]) }

Thank you!

  • Agree 1
Link to comment
Share on other sites

Hi.  The play count is zero.  Therefore, there is no last played date.

Link to comment
Share on other sites

justmeyep
6 minutes ago, ebr said:

Hi.  The play count is zero.  Therefore, there is no last played date.

Sorry that I didn't write it more clearly.

The file has been played((Played: true)) but the play count seems tobe incorrectly saved/reported as well.

Link to comment
Share on other sites

The fact the play count is zero means there will be no last played date.  It is possible the item was marked played but not actually played.

Link to comment
Share on other sites

justmeyep
On 06/06/2023 at 23:50, ebr said:

The fact the play count is zero means there will be no last played date.  It is possible the item was marked played but not actually played.

Does that mean this is an intentional behaviour change? I didn't find anything regarding it in the changelog. 

 

Library on the current Emby release build, the episode has not been watched yet:

(body: [ (Name: Beginner), (ServerId: 9bc2c3573a134a4a9427c1f6b036a869), (Id: 7), (DateCreated: 2023-06-08T18:39:54.0000000Z), (PremiereDate: 2014-04-09T00:00:00.0000000Z), (Path: /data/drive/media/test/No Game No Life/No Game, No Life - S01E01 - Beginner Bluray-1080p [Lulu].mkv), (RunTimeTicks: 14421360000), (ProductionYear: 2014), (IndexNumber: 1), (ParentIndexNumber: 1), (ProviderIds: [ (Tvdb: 4789306) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 0), (IsFavorite: false), (Played: false) ]), (SeriesName: No Game, No Life), (SeriesId: 6), (SeasonId: 24), (SeriesPrimaryImageTag: 5bd1ea29f2daf60ae28342d6f1e4f3cf), (SeasonName: Season 1), (MediaType: Video) ]) }

Library on the current Emby release build, the episode has only been marked as watched:

(body: [ (Name: Beginner), (ServerId: 9bc2c3573a134a4a9427c1f6b036a869), (Id: 7), (DateCreated: 2023-06-08T18:39:54.0000000Z), (PremiereDate: 2014-04-09T00:00:00.0000000Z), (Path: /data/drive/media/test/No Game No Life/No Game, No Life - S01E01 - Beginner Bluray-1080p [Lulu].mkv), (RunTimeTicks: 14421360000), (ProductionYear: 2014), (IndexNumber: 1), (ParentIndexNumber: 1), (ProviderIds: [ (Tvdb: 4789306) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 1), (IsFavorite: false), (LastPlayedDate: 2023-06-08T18:45:47.0000000Z), (Played: true) ]), (SeriesName: No Game, No Life), (SeriesId: 6), (SeasonId: 24), (SeriesPrimaryImageTag: 5bd1ea29f2daf60ae28342d6f1e4f3cf), (SeasonName: Season 1), (MediaType: Video) ])

 

 

Library on the current Emby beta build, the episode has not been watched yet:

(body: [ (Name: Weak Square), (ServerId: 9bc2c3573a134a4a9427c1f6b036a869), (Id: 29), (DateCreated: 2023-06-08T18:42:44.0000000Z), (PremiereDate: 2014-05-07T00:00:00.0000000Z), (Path: /data/drive/media/test/No Game No Life/No Game, No Life - S01E05 - Weak Square Bluray-1080p [Lulu].mkv), (RunTimeTicks: 14421360000), (ProductionYear: 2014), (IndexNumber: 5), (ParentIndexNumber: 1), (ProviderIds: [ (Tvdb: 4845980) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 0), (IsFavorite: false), (Played: false) ]), (SeriesName: No Game, No Life), (SeriesId: 6), (SeasonId: 24), (SeriesPrimaryImageTag: 5bd1ea29f2daf60ae28342d6f1e4f3cf), (SeasonName: Season 1), (MediaType: Video) ]) }

Library on the current Emby beta build, the episode has only been marked as watched:

(body: [ (Name: Weak Square), (ServerId: 9bc2c3573a134a4a9427c1f6b036a869), (Id: 29), (DateCreated: 2023-06-08T18:42:44.0000000Z), (PremiereDate: 2014-05-07T00:00:00.0000000Z), (Path: /data/drive/media/test/No Game No Life/No Game, No Life - S01E05 - Weak Square Bluray-1080p [Lulu].mkv), (RunTimeTicks: 14421360000), (ProductionYear: 2014), (IndexNumber: 5), (ParentIndexNumber: 1), (ProviderIds: [ (Tvdb: 4845980) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 0), (IsFavorite: false), (Played: true) ]), (SeriesName: No Game, No Life), (SeriesId: 6), (SeasonId: 24), (SeriesPrimaryImageTag: 5bd1ea29f2daf60ae28342d6f1e4f3cf), (SeasonName: Season 1), (MediaType: Video) ]) }

Edited by justmeyep
Link to comment
Share on other sites

I'm not necessarily seeing a behavior change as the parameters are not the same across your tests.  When the playcount is 0 there can be no last played date (because there is no record of it being played).  All your tests with a last played date have a playcount of 1.

Perhaps Luke will have more insight when he has time.

Link to comment
Share on other sites

justmeyep
45 minutes ago, ebr said:

I'm not necessarily seeing a behavior change as the parameters are not the same across your tests.  When the playcount is 0 there can be no last played date (because there is no record of it being played).  All your tests with a last played date have a playcount of 1.

The issue is, that the play count doesn't get set anymore, when marking something as watched.

This behavior is different to the one in release channel. I hope this clears things up.

Edited by justmeyep
Link to comment
Share on other sites

21 hours ago, justmeyep said:

Does that mean this is an intentional behaviour change? I didn't find anything regarding it in the changelog. 

 

Library on the current Emby release build, the episode has not been watched yet:

(body: [ (Name: Beginner), (ServerId: 9bc2c3573a134a4a9427c1f6b036a869), (Id: 7), (DateCreated: 2023-06-08T18:39:54.0000000Z), (PremiereDate: 2014-04-09T00:00:00.0000000Z), (Path: /data/drive/media/test/No Game No Life/No Game, No Life - S01E01 - Beginner Bluray-1080p [Lulu].mkv), (RunTimeTicks: 14421360000), (ProductionYear: 2014), (IndexNumber: 1), (ParentIndexNumber: 1), (ProviderIds: [ (Tvdb: 4789306) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 0), (IsFavorite: false), (Played: false) ]), (SeriesName: No Game, No Life), (SeriesId: 6), (SeasonId: 24), (SeriesPrimaryImageTag: 5bd1ea29f2daf60ae28342d6f1e4f3cf), (SeasonName: Season 1), (MediaType: Video) ]) }

Library on the current Emby release build, the episode has only been marked as watched:

(body: [ (Name: Beginner), (ServerId: 9bc2c3573a134a4a9427c1f6b036a869), (Id: 7), (DateCreated: 2023-06-08T18:39:54.0000000Z), (PremiereDate: 2014-04-09T00:00:00.0000000Z), (Path: /data/drive/media/test/No Game No Life/No Game, No Life - S01E01 - Beginner Bluray-1080p [Lulu].mkv), (RunTimeTicks: 14421360000), (ProductionYear: 2014), (IndexNumber: 1), (ParentIndexNumber: 1), (ProviderIds: [ (Tvdb: 4789306) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 1), (IsFavorite: false), (LastPlayedDate: 2023-06-08T18:45:47.0000000Z), (Played: true) ]), (SeriesName: No Game, No Life), (SeriesId: 6), (SeasonId: 24), (SeriesPrimaryImageTag: 5bd1ea29f2daf60ae28342d6f1e4f3cf), (SeasonName: Season 1), (MediaType: Video) ])

 

 

Library on the current Emby beta build, the episode has not been watched yet:

(body: [ (Name: Weak Square), (ServerId: 9bc2c3573a134a4a9427c1f6b036a869), (Id: 29), (DateCreated: 2023-06-08T18:42:44.0000000Z), (PremiereDate: 2014-05-07T00:00:00.0000000Z), (Path: /data/drive/media/test/No Game No Life/No Game, No Life - S01E05 - Weak Square Bluray-1080p [Lulu].mkv), (RunTimeTicks: 14421360000), (ProductionYear: 2014), (IndexNumber: 5), (ParentIndexNumber: 1), (ProviderIds: [ (Tvdb: 4845980) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 0), (IsFavorite: false), (Played: false) ]), (SeriesName: No Game, No Life), (SeriesId: 6), (SeasonId: 24), (SeriesPrimaryImageTag: 5bd1ea29f2daf60ae28342d6f1e4f3cf), (SeasonName: Season 1), (MediaType: Video) ]) }

Library on the current Emby beta build, the episode has only been marked as watched:

(body: [ (Name: Weak Square), (ServerId: 9bc2c3573a134a4a9427c1f6b036a869), (Id: 29), (DateCreated: 2023-06-08T18:42:44.0000000Z), (PremiereDate: 2014-05-07T00:00:00.0000000Z), (Path: /data/drive/media/test/No Game No Life/No Game, No Life - S01E05 - Weak Square Bluray-1080p [Lulu].mkv), (RunTimeTicks: 14421360000), (ProductionYear: 2014), (IndexNumber: 5), (ParentIndexNumber: 1), (ProviderIds: [ (Tvdb: 4845980) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 0), (IsFavorite: false), (Played: true) ]), (SeriesName: No Game, No Life), (SeriesId: 6), (SeasonId: 24), (SeriesPrimaryImageTag: 5bd1ea29f2daf60ae28342d6f1e4f3cf), (SeasonName: Season 1), (MediaType: Video) ]) }

What are the request URLs?

Link to comment
Share on other sites

justmeyep
On 09/06/2023 at 18:19, Luke said:

What are the request URLs?

"http://emby:8096/Users/77736de015d24e578f137f0642005491/items/?sortBy=DateCreated&sortOrder=Ascending&parentId=4&recursive=true&enableUserData=true&enableImages=false&excludeLocationTypes=Virtual&fields=ProviderIds%2CDateCreated%2COriginalTitle%2CSeasonUserData%2CDateLastSaved%2CPremiereDate%2CProductionYear%2CPath&includeItemTypes=Movie%2CEpisode&limit=1000&startIndex=0"

This should be it

Link to comment
Share on other sites

justmeyep
On 13/06/2023 at 21:53, Luke said:

Try adding UserDataLastPlayedDate to your list of requested fields.

Request URL:

http://emby:8096/Users/4a2a31a0d0af42e6921bed15dc83eae9/items/?sortBy=DateCreated&sortOrder=Ascending&parentId=6545&recursive=true&enableUserData=true&enableImages=false&excludeLocationTypes=Virtual&fields=ProviderIds%2CDateCreated%2COriginalTitle%2CSeasonUserData%2CDateLastSaved%2CPremiereDate%2CProductionYear%2CPath%2CUserDataLastPlayedDate&includeItemTypes=Movie%2CEpisode&limit=1000&startIndex=0)

 

Not watched:

(body: [ (Name: Beater), (ServerId: 7d8366008f954c3baad461fd3c2c102a), (Id: 9180), (DateCreated: 2023-06-13T05:47:30.0000000Z), (PremiereDate: 2012-07-15T00:00:00.0000000Z), (Path: /data/drive/media/anime/Sword Art Online (2012) [tvdb-259640]/Season 01/Sword Art Online (2012) - S01E02 - Beater Bluray-1080p [sam].mkv), (RunTimeTicks: 14200240000), (ProductionYear: 2012), (IndexNumber: 2), (ParentIndexNumber: 1), (ProviderIds: [ (Tvdb: 4354382), (Imdb: tt2300828) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 0), (IsFavorite: false), (Played: false) ]), (SeriesName: Sword Art Online), (SeriesId: 9175), (SeasonId: 9176), (SeriesPrimaryImageTag: dc0f2c31f86a112b6b610d1588ebd5e0), (SeasonName: Season 1), (MediaType: Video) ]) }

 

Marked watched:

(body: [ (Name: Beater), (ServerId: 7d8366008f954c3baad461fd3c2c102a), (Id: 9180), (DateCreated: 2023-06-13T05:47:30.0000000Z), (PremiereDate: 2012-07-15T00:00:00.0000000Z), (Path: /data/drive/media/anime/Sword Art Online (2012) [tvdb-259640]/Season 01/Sword Art Online (2012) - S01E02 - Beater Bluray-1080p [sam].mkv), (RunTimeTicks: 14200240000), (ProductionYear: 2012), (IndexNumber: 2), (ParentIndexNumber: 1), (ProviderIds: [ (Tvdb: 4354382), (Imdb: tt2300828) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 0), (IsFavorite: false), (LastPlayedDate: 2023-06-17T04:16:36.0000000Z), (Played: true) ]), (SeriesName: Sword Art Online), (SeriesId: 9175), (SeasonId: 9176), (SeriesPrimaryImageTag: dc0f2c31f86a112b6b610d1588ebd5e0), (SeasonName: Season 1), (MediaType: Video) ]) }

 

This seems to bring back the LastPlayedDate, however the PlayCount stays at 0. Is this intended?

 

 

Link to comment
Share on other sites

justmeyep
On 17/06/2023 at 14:35, Luke said:

No. Did you mark it unwatched before marking it watched?

I don't think so.

To be sure I tried it with a new file, the behaviour is the same, see below.

Never watched:

(body: [ (Name: Half Measures), (ServerId: 7d8366008f954c3baad461fd3c2c102a), (Id: 10620), (DateCreated: 2023-06-18T17:45:04.0000000Z), (PremiereDate: 2010-06-06T00:00:00.0000000Z), (Path: /data/drive/media/tv/Breaking Bad (2008) [tvdbid-81189]/Season 03/Breaking Bad - S03E12 - Half Measures WEBDL-1080p [playWEB].mkv), (RunTimeTicks: 28494110000), (ProductionYear: 2010), (IndexNumber: 12), (ParentIndexNumber: 3), (ProviderIds: [ (Tvdb: 2106591), (Imdb: tt1615552) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 0), (IsFavorite: false), (Played: false) ]), (SeriesName: Breaking Bad), (SeriesId: 9637), (SeasonId: 10347), (SeriesPrimaryImageTag: 13e5961b8329015f16beec9152bf9627), (SeasonName: Season 3), (MediaType: Video) ]) }

 

Marked watched:

(body: [ (Name: Half Measures), (ServerId: 7d8366008f954c3baad461fd3c2c102a), (Id: 10620), (DateCreated: 2023-06-18T17:45:04.0000000Z), (PremiereDate: 2010-06-06T00:00:00.0000000Z), (Path: /data/drive/media/tv/Breaking Bad (2008) [tvdbid-81189]/Season 03/Breaking Bad - S03E12 - Half Measures WEBDL-1080p [playWEB].mkv), (RunTimeTicks: 28494110000), (ProductionYear: 2010), (IndexNumber: 12), (ParentIndexNumber: 3), (ProviderIds: [ (Tvdb: 2106591), (Imdb: tt1615552) ]), (IsFolder: false), (Type: Episode), (UserData: [ (PlaybackPositionTicks: 0), (PlayCount: 0), (IsFavorite: false), (LastPlayedDate: 2023-06-18T17:55:10.0000000Z), (Played: true) ]), (SeriesName: Breaking Bad), (SeriesId: 9637), (SeasonId: 10347), (SeriesPrimaryImageTag: 13e5961b8329015f16beec9152bf9627), (SeasonName: Season 3), (MediaType: Video) ]) }

 

 

Link to comment
Share on other sites

justmeyep
2 hours ago, Luke said:

How are you marking it played?

Using the 'Mark played' button for the episode in the UI of the (web) client

Link to comment
Share on other sites

  • 1 month later...

Try adding UserDataPlayCount and UserDataLastPlayedDate to your requested fields.

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