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

Kodi Omega Beta 3 and beyond: fix movies not showing up (thanks @Spacetech) #2028

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

croneter
Copy link
Owner

@croneter croneter commented Mar 1, 2024

Original PR by @Spacetech: #2026
Fixes #2025

check for videoversion table

remove trailing whitespace

use INSERT OR REPLACE INTO
@croneter croneter added the Python 3 Starting with Kodi 19 Matrix, Kodi uses Python 3 label Mar 1, 2024
@croneter croneter merged commit 7d900f4 into python3-beta Mar 1, 2024
1 check passed
@croneter croneter deleted the Spacetech-kodi21_video_version branch March 1, 2024 20:25
@Adam1986
Copy link

Adam1986 commented Mar 1, 2024

Evening guys, so my PKC updated to 3.8.6 just a short while ago.

I restarted my CoreELEC install & was greeted with a prompt about this version of KODI needing a database reset. So followed it through, unfortunately I now have an empty Movies collection!

Has something accidently been regressed by mistake? As when I edited the two files that Spacetech had edited earlier in the week all worked fine for me.

Have reset the database via PKC settings too, but just the same.

@thorindwarf
Copy link

thorindwarf commented Mar 1, 2024

No issues at all here after upgrading from 3.8.4 to 3.8.6, followed the pkc prompts for Kodi db reset.
No modifications to any file upfront.
LibreELEC 11.0.3 (Kodi 20.2) on Pi4

@Adam1986
Copy link

Adam1986 commented Mar 1, 2024

No issues at all here after upgrading from 3.8.4 to 3.8.6, followed the pkc prompts for Kodi db reset. No modifications to any file upfront. LibreELEC 11.0.3 (Kodi 20.2) on Pi4

Ah so in your case you still look to be on KODI 20 & not at least 21 Beta 3.

I downgraded back to 3.8.5 & rebuilt the database again and appears to be working OK on that version.

@Spacetech
Copy link

@croneter This change is causing trouble on the latest nexus release.

The result of

        self.cursor.execute('PRAGMA table_info(videoversion)')
        columns = self.cursor.fetchall()

is: [(0, 'idFile', 'INTEGER', 0, None, 1), (1, 'idMedia', 'INTEGER', 0, None, 0), (2, 'media_type', 'TEXT', 0, None, 0), (3, 'itemType', 'INTEGER', 0, None, 0), (4, 'idType', 'INTEGER', 0, None, 0)]

I think the code needs to be something like:

        # Check whether all needed columns for table videoversion actually exist
        self.cursor.execute('PRAGMA table_info(videoversion)')
        columns = self.cursor.fetchall()
        needed_columns = (
            'idFile',
            'idMedia',
            'media_type',
            'itemType',
            'idType'
        )

        for column_info in columns:
            if column_info[1] not in needed_columns:
                return
  
        self._has_video_version_table = True

@croneter
Copy link
Owner Author

croneter commented Mar 2, 2024

That's what happens if you can't run Kodi Nexus 3 and try to fix stuff for it 😞. Will hopefully work now

@croneter croneter changed the title Kodi Nexus Beta 3 and beyond: fix movies not showing up (thanks @Spacetech) Kodi Omega Beta 3 and beyond: fix movies not showing up (thanks @Spacetech) Mar 2, 2024
@Adam1986
Copy link

Adam1986 commented Mar 2, 2024

Can confirm all working OK now, thanks for resolving the issue so quickly both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python 3 Starting with Kodi 19 Matrix, Kodi uses Python 3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Omega beta 3
4 participants