Toms Online Notebook Sharing my stuff.

Neutron Music Player Song Ratings - Database transfer

by tgutwin

Posted on Thursday Jan 19, 2017 at 08:24PM in Technology

Neutron LogoI figured out how to access and restore the song ratings in the Neutron music player (Android). I needed to transfer all the 1000s of song ratings from an old android pad to a new one.

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/

1st you can look at the song ratings with this SQL query:

      s.guid, s.filename, s.title, r.user
      plist_music_details s, rating_music r
order by
      r.user desc;

Do the following AFTER you have added the folder of songs to the new installation

  1. 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.

  2. Connect to the old database file.

  3. The table holding the ratings is called RATING_MUSIC
    • but you have to relate the ratings to the song table KEY: GUID

  4. 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:
    • SELECT s.title, r.user
      FROM plist_music_details s, rating_music r
      where s.guid=r.guid;

  5. Connect to new Database file.

  6. 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:
    • 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',
            'Vanhalen Rightnow',
            'Cadillac Ranch',
            'Spanish Fly'
    • Add all the songs previously queried in step 3 with rating 5 (field=user) to the list of song names.

  7. One for each rating level  and change the 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.

  8. Backup the neutronmp.db file and Copy the newly updated neutronmp.db file back to your android device.

  9. Restart Neutron

Now all my ratings are imported into my new Neutron installation.


Thanks for sharing this. Now I have my ratings back!

Posted by Josh on July 15, 2018 at 07:49 AM PDT #

Leave a Comment

HTML Syntax: NOT allowed