sualfred 677 Posted June 17, 2017 Posted June 17, 2017 (edited) Hey there,it seems that there is an issue left with the Krypton compatiblity.Scenario:- Fresh DB- All values correctly setAs 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: Now Kodi isn't able to get the correct rating anymore OR shows different ratings in the MyVideoNav.xml and DialogVideoInfo.xml. Edited June 17, 2017 by sualfred
Angelblue05 4132 Posted June 17, 2017 Posted June 17, 2017 Thanks for reporting, it will be looked at.
sualfred 677 Posted June 17, 2017 Author Posted June 17, 2017 (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 June 17, 2017 by sualfred
sualfred 677 Posted June 17, 2017 Author Posted June 17, 2017 (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 June 17, 2017 by sualfred
sualfred 677 Posted June 17, 2017 Author Posted June 17, 2017 (edited) Solved, I'll create a PR in the next few minutes. It also affected episodes and tvshows. Edit: PR is open -> https://github.com/MediaBrowser/plugin.video.emby/pull/95 Edited June 17, 2017 by sualfred
sualfred 677 Posted June 27, 2017 Author Posted June 27, 2017 @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? 1
Angelblue05 4132 Posted June 27, 2017 Posted June 27, 2017 (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 June 27, 2017 by Angelblue05 1
Recommended Posts