croneter / PlexKodiConnect

Plex integration in Kodi done right
GNU General Public License v2.0
1.18k stars 78 forks source link

Fix movie issues in kodi 21 #2026

Closed Spacetech closed 8 months ago

Spacetech commented 8 months ago

Kodi 21 changed the movie_view db query, which broke support for movies added by PKC. We now need to insert a row into the videoversion table for each movie. Check this issue for more information. @AmonFlorian created a fix for jellyfin-kodi, which I applied to PKC.

Changes

Testing instructions:

  1. Stop kodi
  2. !! If you were ever on an alpha or beta version of kodi 21, I recommend deleting all your MyVideos*.db files to ensure you start from a good state. !!
    • This will ensure kodi creates a valid videoversiontype table
  3. Apply PR changes to the python files in the addon folder
  4. Start kodi
  5. Reset the kodi databases from plexkodiconnect settings
  6. Movies should now show up

Fixes #2025

croneter commented 8 months ago

Awesome, thanks so much @Spacetech!

Adam1986 commented 8 months ago

Tested this on my setup after applying beta 3 & this is working perfectly.

Abasz commented 8 months ago

I confirm that this worked for me. I tried without deleting the video dbs, just reset kodi database and that worked. Thanks!

Adam1986 commented 8 months ago

Although after relaunching Kodi I see a prompt comes up in the top right that simply says:

Unique constraint failed:video version.idFile

Spacetech commented 8 months ago

Although after relaunching Kodi I see a prompt comes up in the top right that simply says:

Unique constraint failed:video version.idFile

Do you know if that happened when adding or removing a movie? Can you share the error that showed up in your kodi log for that? I'm wondering if my DELETE FROM videoversion statement is incorrect.

Edit: Nevermind, should be solved now. Had to use INSERT OR REPLACE INTO similar to the insertion into the movies db. That's because this method could be called again for an existing movie

Adam1986 commented 8 months ago

Although after relaunching Kodi I see a prompt comes up in the top right that simply says: Unique constraint failed:video version.idFile

Do you know if that happened when adding or removing a movie? Can you share the error that showed up in your kodi log for that? I'm wondering if my DELETE FROM videoversion statement is incorrect.

Edit: Nevermind, should be solved now. Had to use INSERT OR REPLACE INTO similar to the insertion into the movies db. That's because this method could be called again for an existing movie

Have replaced the contents of that file and restarted Kodi - all good now no error :-)

AmonFlorian commented 8 months ago

@Spacetech Glad it was to some good use here. :)

aaronmmarks commented 8 months ago

How long will it take for this to make it into the PKC Nexus Beta?

Also, could someone please share instructions for how to install this manually?

Thanks!

croneter commented 8 months ago

Superseded by https://github.com/croneter/PlexKodiConnect/pull/2028