Jump to content

Trakt plug-in messing up my NextUp sorting


cgrey000

Recommended Posts

vdatanet

In my opinion:

 

- When you set an watched episode as unwatched, watched datetime should be set to null

- When you watch a watched episode, watched datetime should be updated

 

Is that true? What is the current behavior?

Edited by vdatanet
Link to comment
Share on other sites

vdatanet

Episode S1.E7 of Show "Verano Azul" was watched yesterday:

 

5d69533a0215f_Anotacin20190830184626.jpg

 

And it's marked as watched:

 

5d6953866eae9_Anotacin20190830184720.jpg

 

With the API I've tried to get info from S1.E7 episode:

 {
      "Name": "Beatriz, Mon amour",
      "ServerId": "0e2add2c5d074653acbdafb6dd2b36b7",
      "Id": "47869",
      "PremiereDate": "1981-11-22T00:00:00.0000000+00:00",
      "RunTimeTicks": 37207360000,
      "IndexNumber": 7,
      "ParentIndexNumber": 1,
      "IsFolder": false,
      "Type": "Episode",
      "ParentBackdropItemId": "45554",
      "ParentBackdropImageTags": [
        "0383bee4148b7d3f8d657ecbd1285765"
      ],
      "UserData": {
        "PlaybackPositionTicks": 0,
        "PlayCount": 1,
        "IsFavorite": false,
        "Played": true
      },
      "SeriesName": "Verano Azul",
      "SeriesId": "45554",
      "SeasonId": "45642",
      "SeriesPrimaryImageTag": "ca4b2cf4855ef2f7bbd1f99d4bf236bd",
      "SeasonName": "Temporada 1",
      "ImageTags": {
        "Primary": "4267fcd73c5d26b353325684b37738a6"
      },
      "BackdropImageTags": [],
      "ParentThumbItemId": "45554",
      "ParentThumbImageTag": "2802b70b0290fcf80b7fef90de559d9a",
      "MediaType": "Video"
    },

I see played = true, but LastPlayedDate is empty. I guess that's why this show is not in the first position of the "Next Up" row. What could have happened?

 

Today I've played the episode again and now LastPlayedDate has value, and the show is now the first one in "Next Up". So my conclusion is that LastPlayedDate sometimes is not updated. I have to say that there are very few watched episodes with empty LastPlayedDate, but there are.

"UserData": {
        "PlaybackPositionTicks": 0,
        "PlayCount": 2,
        "IsFavorite": false,
        "LastPlayedDate": "2019-08-30T16:55:01.0000000+00:00",
        "Played": true
      },
Edited by vdatanet
Link to comment
Share on other sites

vdatanet
No, I thought that was the problem and did the following test:

 

- I marked as unwatched a watched episode: watched was set to false and the last watched date was unset.

- I marked as watched an unwatched episode: watched was set to true and the last watched date was set correctly

Edited by vdatanet
Link to comment
Share on other sites

vdatanet

I also thought it was a sync problem with Trakt, but it wasn't. I marked as watched an episode on Trakt and after sync, Emby had the correct values, watched = true and last watched date had the correct value. At some point Emby does not set last watched date correctly. I tried all different situations where that date should be updated and always was correct.  :( Do you have another suggestion to test? 

 

Anyway, this bug is shown very rarely and the only consequence is sorting of "Next Up", it should not be a priority.

Edited by vdatanet
Link to comment
Share on other sites

vdatanet

Any idea when the last playback date set may fail? I've found a couple more episodes, watched without last watched date.

Link to comment
Share on other sites

It could perhaps be from trakt. I'm not sure. You could try running without it for a little while and see if it happens again with new content.

Link to comment
Share on other sites

Gilgamesh_48

It could perhaps be from trakt. I'm not sure. You could try running without it for a little while and see if it happens again with new content.

 

I have had a few, non-serious, errors caused by being connected to Trakt. I have currently three servers running and I use Trakt to keep the TV watched status synced. Once in a rare while something happens on one of the servers and it gets the watched status screwed up on all the servers if the screwed up server updates its watched status before the others or if the screwed up server gets ahead of all the others.

 

One example is that the screwed up server somehow marked a season two as watched on one of my servers when I was actually watching somewhere in the middle of season one. When that updated to TRAKT I suddenly had S03E01 as my "Next up." I tried to correct it on the server I was using for watching but every time it hit Trakt season two would be marked as watched. To fix the problem I had to go into each server and mark season two unwatched before an update to Trakt and go into Trakt and mark season two unwatched. It worked OK. I am sure that there might be an easier way but I want to keep all three servers equal in the eyes of Trakt. That is. right now, I do not want a "primary" server with the others in a subservient mode..

 

Once everything pretty much stabilizes in functionality (problems due to having to reinstall Emby) there will be one server as the "primary" server and the others will just get updated from Trakt to stay in sync with the primary. But for now I am as likely to watch something from one as I am from another and I just want to have it be pretty reliable and that is exactly where it is. The screwups are both rare and unpredictable.

Link to comment
Share on other sites

vdatanet

It could perhaps be from trakt. I'm not sure. You could try running without it for a little while and see if it happens again with new content.

 

Since I have deactivated the import from Trakt, I have not seen this problem anymore.

Edited by vdatanet
Link to comment
Share on other sites

vdatanet

Trakt disabled and again episodes played without last watched date, all played with Apple TV. I have done some tests and all those episodes are played with the client for Apple TV. Approximately 50% of the episodes played with Apple TV are marked as watched without the last watched date.

 

https://emby.media/community/index.php?/topic/77518-sometimes-after-playing-an-episode-it-is-marked-as-watched-without-the-last-watched-date/

Edited by vdatanet
Link to comment
Share on other sites

vdatanet

And this is only with trakt installed?

 

 

It happens with and without trakt plugin installed:

 

This is an episode I played yesterday on Apple TV:

 

5d7c9a701f78c_Capturadepantalla20190914a

 

Look that is played and last played date is missing. After playing that episode, next episode is not in the first position of "Next Up" row. There's not any trakt command in that period of time, because it's uninstalled. But this occurs randomly.

 

I've never seen this in any other Emby client, only in the Apple TV client.

Edited by vdatanet
Link to comment
Share on other sites

vdatanet

In this particular case, trakt was installed with tasks disabled (import and sync), just scrobbling and trakt has the right date:

 

5d7ca5d22e918_Anotacin20190914102722.jpg

Link to comment
Share on other sites

vdatanet

Scrobbling seems to be the problem, it's not enough to disable import and sync. Can I have the plugin installed with scrobbling disabled and run sync tasks manually? I can't find and option to disable scrobbling.

Link to comment
Share on other sites

  • 2 months later...
Animizio

Yeah I m also with this problem. For the app it was only annoying a bit.. But for Kodi and embruary it's a Desaster..

I need a lot of time to search my actual watching TV shows, because they are nearly at the end of my list sometimes..

Please get a logical sorting for this. For example "last played" or something. It works for Kodi in different skins with custom lists. Please add it for emby apps and Kodi too. Thank you :)

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
vdatanet

Issue is still present. Sometimes a watched item has an empty last watched date.

 

5e5c17f8d87bd_Capturadepantalla20200301a

Link to comment
Share on other sites

 

 

Sometimes

Can you try to find the differences of when it does and when it doesn't? Thanks.

Link to comment
Share on other sites

vdatanet

Can you try to find the differences of when it does and when it doesn't? Thanks.

 

No, The only thing I can say is that before version 3.4 of the plugin it happened very often, instead now it happens very rarely, but I have never been able to reproduce it. I will try to notice when it happens.

 

I attach server log, but it can't see nothing special.

2020-03-01 21:06:15.219 Info HttpServer: HTTP POST http://192.168.1.100:8096/emby/Sessions/Playing/Stopped. UserAgent: Dalvik/2.1.0 (Linux; U; Android 9; SHIELD Android TV Build/PPR1.180610.011)
2020-03-01 21:06:15.219 Info EncodingManager: Deleting partial stream file(s) /var/lib/emby/transcoding-temp/E4E8AD.m3u8
2020-03-01 21:06:15.219 Info SessionManager: Playback stopped reported by app AndroidTv 1.7.78g playing El gran Lunes. Stopped at 2547384 ms
2020-03-01 21:06:15.221 Info Trakt: Playback Stopped
2020-03-01 21:06:15.221 Info HttpServer: HTTP Response 204 to 192.168.1.88. Time: 2ms. http://192.168.1.100:8096/emby/Sessions/Playing/Stopped
2020-03-01 21:06:15.221 Info Trakt: Item is played. Scrobble
2020-03-01 21:06:15.221 Info HttpClient: POST https://api.trakt.tv/scrobble/stop
2020-03-01 21:06:15.221 Info HttpServer: HTTP Response 200 to 192.168.1.88. Time: 2ms. http://192.168.1.100:8096/emby/Shows/NextUp?Fields=Overview&SeriesId=1502&UserId=575b9dd9ae9242548f5bd17cd52c541f&EnableTotalRecordCount=false&Limit=1&format=json
2020-03-01 21:06:15.355 Info HttpServer: HTTP GET http://192.168.1.100:8096/emby/Users/575b9dd9ae9242548f5bd17cd52c541f/Items/2827?format=json. UserAgent: Dalvik/2.1.0 (Linux; U; Android 9; SHIELD Android TV Build/PPR1.180610.011)
2020-03-01 21:06:15.357 Info HttpServer: HTTP Response 200 to 192.168.1.88. Time: 2ms. http://192.168.1.100:8096/emby/Users/575b9dd9ae9242548f5bd17cd52c541f/Items/2827?format=json
2020-03-01 21:06:15.395 Info HttpServer: HTTP POST http://192.168.1.100:8096/emby/Items/2827/PlaybackInfo?format=json. UserAgent: Dalvik/2.1.0 (Linux; U; Android 9; SHIELD Android TV Build/PPR1.180610.011)
2020-03-01 21:06:15.397 Info MediaInfoService: User policy for joan. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True

embyserver.txt

Link to comment
Share on other sites

Gilgamesh_48

Just as a point of info on my systems the Trakt plugin has no issues. I am running server version 4.4.0.17 (beta) on my main system and 4.3.1.0 on my Shield server. Trakt is installed on both systems.

I also have a Plex server that is running Trakt as well.

 

I had a problem some time ago when I attempted to reactivate an old Plex server and it was so of of date that it updated Trakt with very outdated data and really screwed up my next up status on both my Emby servers. I reverted the Emby servers back to the data as it was before I activated that Plex server was activated but I could not get Trakt correct. I the created a new Trakt account and linked my Emby servers to the new account. Then I completely deleted the Plex server and all related data and reinstalled Plex anew and added Trakt back to it. I allowed Plex to sync to the new Trakt account and then fully linked Trakt to it as well. I now have Trakt updating (push/pull) all my servers and everything is absolutely solid and I can watch any show on any server and it updates Trakt and the other servers correctly.

 

I spent a LOT of time trying to fix the screwed up data on Trakt but it seems that once it is screwed up it becomes nearly unfixable and the only way to get correct operation back is with a new account.

Link to comment
Share on other sites

  • 4 months later...
vdatanet

There are still episodes watched with no watched date using Trakt, causing the "Next Up" row to be completely messy.

Link to comment
Share on other sites

vdatanet
16 minutes ago, Luke said:

We'd have to go over a specific example. Thanks.

Isn't this topic a representative enough example?

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