Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix movie issues in kodi 21 #2026

Closed

Conversation

Spacetech
Copy link

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

  • Update the videoversion table (when it exists) when adding/removing movies
  • Don't touch the videoversiontype table when resetting the database. This table is created & prepopulated by kodi.

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
Copy link
Owner

Awesome, thanks so much @Spacetech!

@Adam1986
Copy link

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

@Abasz
Copy link

Abasz commented Feb 27, 2024

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

@Adam1986
Copy link

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

Unique constraint failed:video version.idFile

@Spacetech
Copy link
Author

Spacetech commented Feb 28, 2024

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
Copy link

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
Copy link

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

@aaronmmarks
Copy link

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
Copy link
Owner

croneter commented Mar 1, 2024

Superseded by #2028

@croneter croneter closed this Mar 1, 2024
@Spacetech Spacetech deleted the kodi21_video_version branch March 1, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Omega beta 3
6 participants