Hey, I’ve got a long-existing mariadb database for my handful of osmc devices, and for the most part things are fine, except for files with unicode characters in them.
Sample error when playing a file with a special character:
2024-01-17 21:47:04.935 T:2968 info <general>: VideoPlayer::OpenFile: /tbla/video/tv/The 100/season02/The 100 - S02E11 - Coup de Grâce.mkv
2024-01-17 21:47:04.946 T:3149 info <general>: Creating InputStream
2024-01-17 21:47:05.068 T:3149 error <general>: SQL: [xbmc_video121] Undefined MySQL error: Code (1267)
Query: SELECT allAudio FROM path WHERE allAudio IS NOT NULL AND instr('/tbla/video/tv/The 100/season02/The 100 - S02E11 - Coup de Grâce.mkv', strPath) = 1 ORDER BY length(strPath) DESC LIMIT 1
Titles for a bunch of movies with special characters don’t show, and when trying to refresh to add, I get a similar
Maybe try just the character-set-server and use plain utf8? Because you altered a table, it’s possible that won’t work though. If it doesn’t, you might have to export the data, delete the Kodi databases, let Kodi create new empty ones, and reimport everything.
Thanks, I’ve updated my config to use this, and want to try the suggestion of resetting back to vanilla schema. I’ve dumped my data without the create commands, but now can’t seem to figure out how to get kodi to recreate.
If I drop the db and create a blank new one, I just get
2024-01-18 12:07:30.144 T:3047 error <general>: SQL: [xbmc_video121] The table does not exist
Query: SELECT idVersion FROM version
I’d have hoped it’d detect the missing tables and recreate them, but I guess not?
Ahh, I was too clever in creating the database for it.
OK things look good here. I had to re-import and re-do the dump with --skip-triggers flag which I’d forgotten about, but I was eventually able to get a nice fresh schema and re-import the data.
A quick test of playing that file worked fine.
Now just need to try updating all the movies/tv with special characters and see if they get updated in the database correctly.
Is there a good way to trigger that for a reasonable number of files (100 or so) rather than one by one refreshing in the gui?
Can you formulate at smart playlist, widget, or library filter to match them? If so then maybe use that to find them and delete them from the library (making sure you have the file deletion option disabled so you don’t have to deal with the second dialog box). It might be kind of tedious but it you keymapped a button to delete them it could go pretty quick. Something like this…
I actually tried to be clever and removed them from moviefiles and path tables with some SQL queries, thinking that then an updateLibrar(video) would re-add them, but that doesn’t seem to be happening
Wow, reading that sounds just like what I need.
However when I tried to run it:
2024-01-19 10:24:56.620 T:6684 error <general>: EXCEPTION IN (/home/osmc/.kodi/addons/plugin.program.kscleaner/resources/lib/common.py, LINE 97 "tree = ET.fromstring((xml_txt.read().replace('&',' ').encode('utf-8')), ET.XMLParser(encoding='utf-8'))"): XML or text declaration not at start of entity: line 1, column 1
2024-01-19 10:24:56.620 T:6684 info <general>: There is a problem with your MySQL configuration
My only config was to tell it ‘mysql’ for video/audio and enter the db names
2024-01-19 10:24:56.536 T:6684 info <general>: KS Cleaner logging database check successful. Addon started.
2024-01-19 10:24:56.558 T:6684 info <general>: Kodi Selective Cleaner Python vesion is: 3.9.2
2024-01-19 10:24:56.584 T:6684 info <general>: KS Cleaner music DB trigger checking is disabled
2024-01-19 10:24:56.620 T:6684 error <general>: EXCEPTION IN (/home/osmc/.kodi/addons/plugin.program.kscleaner/resources/lib/common.py, LINE 97 "tree = ET.fromstring((xml_txt.read().replace('&',' ').encode('utf-8')), ET.XMLParser(encoding='utf-8'))"): XML or text declaration not at start of entity: line 1, column 1
2024-01-19 10:24:56.620 T:6684 info <general>: There is a problem with your MySQL configuration
I just had a little test with it on my PC. I found that it didn’t work in a profile and for the database name you had to (confusingly) supply the database version in the name so in my case my name tag in my advancedsettings.xml is “John” but because Kodi tags on the database version for the Major version of Kodi your running I needed to set the name in this add-on to “John121”.
Sorry for the delay responding. I am on a cruise ship so I have other interests right now Anyway, the issue appears to be my XML parsing code for your advancedsettings.xml file. I think these two lines are causing the issue:
You might try removing them when you run the cleaner and see if that fixes the issue. Someone once suggested I remove the XML parser and just let folks enter the config info manually into the addon. I tried to make it friendly but have run into other things in the XML file I hadn’t expected.
If removing these lines work, I’ll look to fix in the code when I return. I see one other error check I need to add.
Those lines are not from the users advancedsettings.xml file but rather a system level one and they are responsible for feeding temperature info into Kodi.
You can get it from the log file he posted. At the start of Kodi.log it outputs both the system level and userdata advancedsettings.xml files one after the other. They are listed after…
Contents of special://xbmc/system/advancedsettings.xml are...
and Contents of special://profile/advancedsettings.xml are...
respectively.