Kodi Community Forum

Full Version: multiple files rating
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi folks,

there is a way to set "my ratings" on multiple files at the same time?

Idea would be to set a standard rate (5 for example), then filter based on my rating. i.e.: filter out music with "0" in my ratings; highlight only music rated as "10" or >5, ...

Any suggestion? I hope I won't be forced to set manually all my library ... Big Grin

thanks
Andrea
Kodi itself does not proivide  one, but rating can be set using JSON API so an addon could be written that did things with ratings.

Personally if I had batch changes to rating to make I would mess with the database directly using SQL, it is not hard, then again I would see it that way since I have worked with SQL for years. Of course you edit your data at your own risk Smile
Of course Smile Thanks for your answer.

Any idea how can I edit MyMusic70.db? or do I need to migrate to MariaDB?

thanks
Andrea
(2018-02-19, 16:54)nesys Wrote: [ -> ]Any idea how can I edit MyMusic70.db? or do I need to migrate to MariaDB?
What an odd sequence of thoughts. Huh

There are plenty of free SQLite browsers that will allow you to view and modify MyMusic70.db. I use DB Browser for SQLite but I know there are many others. Just take care if this is your first use of SQL etc., and of course take backup copies of this file.

I do not advise you to try this unless you have a reasonable level of techincal experience and competence. It is not hard, SQL is pretty logical, but I really don't want to hear if it goes wrong. I have to say your suggestion of migrating to MariaDB makes me worried that this is a more hands-on approach then you will be comfortable with. But who knows what your skills are, so I mean no offence, simply that you take responsibility for what you do.

On the other hand Kodi is open source, and your db is your data to do with what you wish. So lift the bonnet and poke about - unlike messing with cars you can take a backup copy of the db and easily revert.

I actually don't think there is a simple equivalent tool for MariaDB. Also the MySQL/MariaDB family of databases are much slower than SQLite, which Kodi was designed for. So unless you really need a client server setup for Kodi, I would advise sticking with the local SQLite database (the default Kodi installation).
This is what I was looking for ... thank you Smile

I have some experience with dbs, so no problem Wink I was misunderstanding the Kodi doc, I will stay with SQLite with pleasure Smile

Now I'm understanding much more about Kodi and how the info are stored there. Thank you Smile

It's also good to understand if there are missing info and/or inconsistencies ....

Question: if I change and/or add info inside the db manually, when we will go from MyMusic70.db to MyMusic80.db, all info in the previous db will be copied in the new one? Automagically? Smile

thanks
Andrea
(2018-02-19, 21:09)nesys Wrote: [ -> ]Question: if I change and/or add info inside the db manually, when we will go from MyMusic70.db to MyMusic80.db, all info in the previous db will be copied in the new one? Automagically? Smile
Yes, db is always migrated (v71 will be the next step)
But do be aware that the main db entries are created by scanning tags from music files, so some changes could be overwritten by re-scanning. Rating does not come from tags, so set it how you like.

I'm yet to implement export of song ratings, so if you drop music source(s) will lose vaues you entered or set. There is however an addon that stores your ratings on TADB so you could then retrieve them, but that is an addon so I don't know much about it.
(2018-02-20, 01:26)DaveBlake Wrote: [ -> ]But do be aware that the main db entries are created by scanning tags from music files, so some changes could be overwritten by re-scanning. Rating does not come from tags, so set it how you like.
 of course. I check if there are inconsistencies, then I change tags and I re-check Wink
I think the wiki is misleading, as it suggests that for v18 SQLite is out and MariaDb is in.  AFAIK, the intent is that instead of supporting MySQL as an alternative database MariaDb will be supported (still via advancedsettings options).

I use an extension in Firefox browser and it would be easy to simply do something like
Code:
UPDATE "main"."song" SET "usserrating" = 5 WHERE  "userrating" = 0

scott s.
.
(2018-02-21, 03:59)scott967 Wrote: [ -> ]I think the wiki is misleading, as it suggests that for v18 SQLite is out and MariaDb is in.  AFAIK, the intent is that instead of supporting MySQL as an alternative database MariaDb will be supported (still via advancedsettings options). 
Point me at the misleading wiki, I'm sure the guys that maintain it would happily correct Smile
Wiki fixed, I understand your initial MariaDB comment now Andrea.

My understanding is that as now both MySQL and MariaDB will still be supported for client server installations of Kodi, with SQLite continuing as the default stand-alone setup. But that we will change to assuming the alternative client server db is MariaDB (not MySQL) unless MySQL is specifically set up. The change is about what compatibility layer gets installed/set-up, not what shared library RDBMS users can choose to use.
Just a note to say that song and album user ratings can be backed up and submitted to your user account on the metadata site TheAudioDB, there is also an Add-on.

This may be useful if you wish to rate music on a website, then sync to Kodi quickly by just running the Add-on.

This method is much easier than editing databases Wink It also creates a nice backup online so you can pull down to extra Kodi clients in the future.

It also works the other way round, so you can rate music inside the Kodi GUI, then send it back to the TADB website.

https://forum.kodi.tv/showthread.php?tid=309611