I also posted this on by Blog page at http://links.webarts.ca/NeutronSongRatingsDB
1st off - Neutron is a fantastic music player.
but, there is next to no documentation on the forum so here is how I did it, with all the details.
Neutron stores its user settings in an SQLite database.
The settings database file is /sdcard/Android/data/com.neutroncode.mp/neutronmp.db
1st you can look at the song ratings with this SQL query:
Code: Select all
SELECT
s.guid, s.filename, s.title, r.user
FROM
plist_music_details s, rating_music r
where
s.guid=r.guid
order by
r.user desc;
Copy the old existing db file AND the new one (with different names) to a desktop computer where it is easier to access with a more robust database client that will support SQLite files. I use SquirrelSQL db client.
Connect to the old database file.
The table holding the ratings is called RATING_MUSIC
but you have to relate the ratings to the song table KEY: GUID
Query the old database to get the ratings related to the song names. The song names are in one table (plist_music_details), the ratings (rating_music) in another
Here is SQL:
Code: Select all
SELECT s.title, r.user
FROM plist_music_details s, rating_music r
where s.guid=r.guid;
I execute One query for each rating level (1-5) with a list of its songs
I used the song title to get the current/new database KEY: GUID for the song,
then I added the rating linked to that GUID key
Here is the SQL to add ratings for songs with rating=5 linked to the songs:
Code: Select all
INSERT into rating_music
SELECT s.guid, 5, strftime('%s','now'), null
FROM plist_music_details s
WHERE s.title IN
(
'4 White Stallions / Big Yellow Taxi',
'Light In The Tunnel',
'Surprise Surprise',
'4 White Stallions / Big Yellow Taxi',
'Light In The Tunnel',
'Surprise Surprise',
'Premonition',
'Vanhalen Rightnow',
'Cadillac Ranch',
'Birdland',
'Spanish Fly'
)
One for each rating level and change te hard-coded 5 to a 4 or 3 etc. I took the results from step 3 and, in my text editor and added the quotes, then copied into the SQL and ran it.
Backup the neutronmp.db file and Copy the newly updated neutronmp.db file back to your android device.
Restart Neutron
Now all my ratings are imported into my new Neutron installation.