nixgates / plugin.video.seren

Repository for Seren Development
319 stars 102 forks source link

[BUG] Trakt syncning issue #864

Open leemacca13 opened 1 year ago

leemacca13 commented 1 year ago

Describe the bug Currently using kodi 19.4 with the Auramod skin. Since the update to Seren 3.0.0 an issue has appeared in the next up section whenever a show or episode is marked as watched on another device or via the trakt website. When the item is watched using another device I.e a second box or marked as watched via the trakt website once the widget refreshes it changes to a no results found icon. If I go into the addon itself and click next up nothing happens. The issue can only be resolved by rebuilding the database. But happens again if the same action is repeated.

To Reproduce Steps to reproduce the behavior:

  1. Watch an episode from next up section on another device or mark an episode as watched via the trakt website.
  2. Reload skin or open the next up menu
  3. See error

Expected behavior Normally if I watch an episode of a show on my other device or use the trakt website to make an episode as watched, when I open kodi on a different device linked to the same trakt account the widget refreshes to show that change within a few seconds.

Screenshots

Kodi Version (please complete the following information):

Additional context Add any other context about the problem here.

nixgates commented 1 year ago

Sounds to me that there may be an underlying issue with the database on the device. I can't seem to replicate this on my end.

Is this all devices?

Could we bother you for a log that encapsulates the next up menu failing?

leemacca13 commented 1 year ago

It seems to be on both of my Amazon firecubes. Especially if watching a new show.

I have hopefully added the log correctly apologies if this is wrong as I've never done one before. I believe the log is available at https://paste.kodi.tv/urazeqagoq

I have also added a second log where I have gone into the addon itself rather using widgets and tried to open the next up menu.

https://paste.kodi.tv/xepihotepe

nixgates commented 1 year ago

Ok we've managed to identify and put together a resolution for this issue!

It wil be available next update but for a quick run down, here's what's happening:

The problem is the way we are handling the sync in the background, we currently set all watched states to false and then re-apply them during the sync. This is due to Trakt not identifying items which have been marked as un-watched.

Whats happening is the menu list is being called during the two states of the sync on startup and causing this issue.

What you can do in the interim is wait a minute or two for the sync to complete and then refresh the skin. This will show the list correctly.

I hope to have the update out soon, we are just in the stage of going over a few other bugs first!

leemacca13 commented 1 year ago

That's great, thank you so much for taking the time to have a look and come up with a solution, and also take the time to explain what was happening too. I will give that a go in the mean time till the update is out, and thanks once again for your help. Very much appreciated.