Database Info
#1
Hello,

Is there a settings screen in the latest version or an add-on that can show the location, name, version etc of the library databases in use?

Thanks.
Reply
#2
All databases are located in userdata folder aptly named: Database
See link: http://kodi.wiki/view/Database_versions
Reply
#3
Database versions are also logged to http://kodi.wiki/view/Log_file on startup.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
Thanks for he info.
I use shared MySQL databases and have multiple devices. It would be great to see which version of the databases a device is using somehow from the GUI rather than from the log files. Perhaps on the system info page?

Perhaps I should learn to code a bit and develop an add-on. I am not even sure if those database tables with relevant info are being exposed by Kodi for add-ones to use or not.
Reply
#5
You can see what version of the database is being used from the GUI. You just look at the version that Kodi is using. If the version is different, then it won't work. If everything is on the same version, then it works. The video DB has always been bumped between major releases. Simple, yes?
Reply
#6
I think it would be a useful feature for Kodi to return the database version for each database it's using. Something that would be accessible via python.

I understand db are only bumped between major releases, but the fact that I can't assume there's only going to be one database named myvideosxx.db in the database folder, for example, makes it a necessity to have this sort function, both for user and add-on developer friendliness.
Reply
#7
Add-ons should never interact with the direct database file. IIRC, that's actually one of the rules for the official add-on repository. Instead, add-ons are expected to use the Kodi APIs to interact with the database files.

Even if you still wanted to interact with the database file, you can still figure out the exact database version number from the version number of Kodi. We don't change any database versions within a v14 or v15 release, so it's the same for v15.0, v15.1, etc.

I'm not opposed to your idea, but I don't see any use case for it.
Reply
#8
Indeed, I understand for the rule for the official add-on repository. Kodi is powerful, and to have the best possible outcome under one roof it is necessary. However if one was to argue (which I am not!!), it's not all about the official repo rules, or we would not be able to install custom repos, custom add-ons, etc. Smile

Anyway, back to the database number! This becomes a problem during the transition phase. Let's take Isengard for example myvideosxx.db.

I've seen RC1 with 92, I've also seen RC2 with 92 (early build for android I think) and RC2 with myvideos93.db for windows, etc. It is a nightmare until the final version where everyone is officially on 93. So even if I wanted to base it off the Kodi version there will always be that transition phase.

I could also do something like thumbnail cleaner and ask the user to input the version number in settings, but again for user friendliness I'd rather not have them have to jump through hoops for such information when it changes (ok, that's a given, texturesxx.db has been 13 for as long as I can remember, but who knows in the future, you probably do, hehe)....

Since it's something Kodi already mentions in logs, might as well make the information usable to developers that already know their idea is not yet ready for the official repo or any other reasons really... Smile
Reply
#9
Db version in the interface is not going to happen.
Add-ons should never directly use our db file, ever. Either in or outside our repository. Direct interaction with database got removed in Frodo 12.0 and ALL should use jsonrpc. End of story.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#10
Fair enough. I was just voicing my opinion. Smile
Reply
#11
Honestly speaking, I am not sure why Team Kodi is strictly against having the DB version in the GUI. Once in a while I like to clean out my old databases from my NAS device. It would be great to be able to easily see which ones are still in use and which ones can be deleted. A good example right now is that I have my Windows devices upgraded to the latest release. My Openelec device is still on the previous (their latest) stable release. If I were to install a beta/RC I may have additional databases as well. My Android device is still on the old version as well but I have no idea which databases it is using. I could check Kodi versions and then find the details online but (like Angelblue05 said) having RC release will make it more complicated.

Regarding directly accessing DB from an Add-On; it doesn't have to be that way. Perhaps, Add-on could get this information from the log file or from some function exposed by the core Kodi?
Reply
#12
I don't think there's a general strong objection to having it communicated if there is a good use case. I think it's just that some of the examples leave some uneasy. I'm not a dev myself, so I don't know what technical issues there might be, but I think DJDJDJDJ is correct that an add-on should be able to pluck all of that info out of the log file. Heck, one could get really fancy, an add-on could even check the Kodi source code on github and somehow extract that information :)

I don't really feel strongly about any of it, personally.
Reply
#13
The biggest issue with json-rpc is the fact that it's a slow process if you want to work with more than just one item. I'm guessing right now, one jsonrpc query = one commit to the database? It's just very slow at large scale. I'm also not a fan of the whole forced update library after every query, slows things down even more. Will definitively post with a number of json rpc functions still missing, when there's time.
Reply

Logout Mark Read Team Forum Stats Members Help
Database Info0