Jump to content

Issue with updating ratings for movies


Recommended Posts

sualfred
Posted (edited)

Hey there,

it seems that there is an issue left with the Krypton compatiblity.

Scenario:
- Fresh DB
- All values correctly set

As soon as I'm updating the rating of a movie, Kodi will update the information. BUT... it gets a wrong unique ID of the uniqueid and rating table. This will cause a new row with a wrong ID in that tables. That means different ratings are doubled in the database for the same mediaid.

 

I've added some simple logging to show the issue:
 

10:58:09.349 T:2700  NOTICE: EMBY.websocket_client -> Message: {"MessageType":"LibraryChanged","Data":{"FoldersAddedTo":[],"FoldersRemovedFrom":[],"ItemsAdded":[],"ItemsRemoved":[],"ItemsUpdated":["2556d2615bbf0250117c7d1dd33825cf"]}}
10:58:09.350 T:2700  NOTICE: EMBY.librarysync -> Queue update: [u'2556d2615bbf0250117c7d1dd33825cf']
10:58:09.395 T:5764  NOTICE: EMBY.database -> opened: D:\Kodi\Kodi Krypton\portable_data\userdata\Database\emby.db - 404486144
10:58:09.395 T:5764  NOTICE: EMBY.database -> Verifying emby DB
10:58:09.398 T:5764  NOTICE: EMBY.database -> opened: D:\Kodi\Kodi Krypton\portable_data\userdata\Database\MyVideos107.db - 542466512
10:58:09.404 T:5764  NOTICE: EMBY.database -> opened: D:\Kodi\Kodi Krypton\portable_data\userdata\Database\MyMusic60.db - 536409392
10:58:09.432 T:5764  NOTICE: EMBY.objects.movies -> movieid: 457 fileid: 457 pathid: 457
10:58:09.445 T:5764  NOTICE: EMBY.objects.movies -> UPDATE movie itemid: 2556d2615bbf0250117c7d1dd33825cf - Title: Vaiana - MovieID: 457
10:58:09.445 T:5764  NOTICE: EMBY.objects.movies -> Get rating ID by MovieID: 457
10:58:09.445 T:5764  NOTICE: EMBY.objects.movies -> RatingID: 976
10:58:09.446 T:5764  NOTICE: EMBY.objects.movies -> Get unique ID by MovieID: 457
10:58:09.446 T:5764  NOTICE: EMBY.objects.movies -> UniqueID: 976
10:58:09.497 T:5764  NOTICE: EMBY.database -> closing: D:\Kodi\Kodi Krypton\portable_data\userdata\Database\MyMusic60.db - 536409392
10:58:09.497 T:5764  NOTICE: EMBY.database -> number of rows updated: 63
10:58:09.514 T:5764  NOTICE: EMBY.database -> commit: D:\Kodi\Kodi Krypton\portable_data\userdata\Database\MyVideos107.db
10:58:09.514 T:5764  NOTICE: EMBY.database -> closing: D:\Kodi\Kodi Krypton\portable_data\userdata\Database\MyVideos107.db - 542466512
10:58:09.517 T:5764  NOTICE: EMBY.database -> number of rows updated: 1
10:58:09.533 T:5764  NOTICE: EMBY.database -> commit: D:\Kodi\Kodi Krypton\portable_data\userdata\Database\emby.db
10:58:09.533 T:5764  NOTICE: EMBY.database -> closing: D:\Kodi\Kodi Krypton\portable_data\userdata\Database\emby.db - 404486144
10:58:09.535 T:5764  NOTICE: EMBY.librarysync -> Updating emby database.
10:58:09.538 T:5764  NOTICE: EMBY.librarysync -> New sync time: server time -2 min: 2017-06-17T08:56:10Z
10:58:09.543 T:5764  NOTICE: EMBY.librarysync -> Updating video library.

As you can see, it gets the unique and rating ID 976, but the correct value should be 457. 

 

The result is one correct and one wrong entry in the rating and uniqueid table:

 

5944f3122f71c_wrong.png

 

Now Kodi isn't able to get the correct rating anymore OR shows different ratings in the MyVideoNav.xml and DialogVideoInfo.xml.

Edited by sualfred
Angelblue05
Posted

Thanks for reporting, it will be looked at.

sualfred
Posted (edited)

Thanks for reporting, it will be looked at.

 

Thanks.

 

It's important to check it with a movie item, which has never been touched after the initial Kodi sync. As soon it has been updated once, it will get the correct unique and rating ID. But the duplicate rows do already exist, which leads into the same errors.

Edited by sualfred
sualfred
Posted (edited)

@@Angelblue05

 

Guess I found the issue. 

Since the media ID is only unique for movies or for episodes, it fetches the wrong one. A simply query modification (adding the media_type value to the filter) should do the trick

Edited by sualfred
  • 2 weeks later...
sualfred
Posted

@Angeblue05

 

I don't want to annoy you and the other devs, but the PR is open since almost 2 weeks. Any chance to get it merged soon? :)

  • Like 1
Angelblue05
Posted (edited)

Yep, sorry about that. Merged now. I'm currently working on updating the manual sync at this time. So your PR will be part of the next beta once I'm ready to release :)

Edited by Angelblue05
  • Like 1
sualfred
Posted

Thanks :)

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