I've been using MusicBee for more than a decade. That means years of playcounts, ratings, loved tracks and so on.
When I set up myself a Navidrome server, I didn't want to lose all those years of data, so I decided to do something to import them.
And I actually still use MusicBee, I only use Navidrome when I'm not home, so I wanted to be able to sync my local ratings/playcounts etc. from time to time.
Hence this project. It's probably a niche use case, but who knows, it can be useful to somebody?
MusicBee to Navidrome Sync allows you to:
- import MB tracks playcount, ratings, loved tracks, last played date. You can add them to already existing ND data (for a first time sync), or update them occasionally if needed.
- update ND albums/artists playcount and last played date, and generate or update their ratings based only on ND data (see Notes);
- First, you need MusicBee 3.5 with its language set as English and Additional Tagging & Reporting Tools plugin installed
- Once it's done, select Music under the Collection menu. Then click on MusicBee > Tools > Additional Tagging Tools > Library Report... to export library data in a CSV
- Click New Preset to create a new preset, and give it a name by just by typing anything in the field where (Auto preset name) is displayed
- You can now add data to your export, by clicking on Add (Function select needs to be
<Grouping>
). Here, you have to select tags that will be exported as headers for your CSV. You need to select at least the following ones for MBNDS to work properly:<File Path>
<Filename>
<Folder>
Title
Last Played
Play Count
Rating
Love
Skip Count
- If the checkbox is available, you can tick Hide preview, it'll scan your library faster
- Click on Preview, MusicBee will scan your entire collection, so it can take some time depending on its size. Once it's done, select
CSV
in Format (if necessary), click on Export and name your fileMusicBee_Export.csv
- Shutdown Navidrome properly. This is mandatory to avoid backing up its database while there's still operations going on with it.
- Once Navidrome is shut down, backup its database file,
navidrome.db
. Its location is usually in navidrome/data
folder. You can back up it either by copying it or with sqlite3 CLI if installed (sqlite3 <path to original file> ".timeout 30000" ".backup <path to backup file>"
for instance). If you back it up by copying, you can also back upnavidrome.db-shm
ornavidrome.db-wal
somewhere too if present, just for precaution. - Download this repository latest release .exe
- Copy only
navidrome.db
andMusicBee_Export.csv
in the same folder as this .exe (or you can provide pathes with CLI, see Commands below). - Run the command you want to run (, see Commands below), your database file will be updated
- Once it's done, go back to navidrome
/data
folder where you foundnavidrome.db
and overwrite it with the updated one. Remove any remainingnavidrome.db-shm
ornavidrome.db-wal
or you will probably get some errors on navidrome startup. - Restart Navidrome, and that's it !
All commands must be run this way: musicbee-navidrome-sync.exe [command name] [options]
.
For instance, musicbee-navidrome-sync.exe fullSync -h
Syncs playcounts, track ratings, loved tracks and last played date from MusicBee DB to Navidrome DB. Runs on tracks first, then updates albums and artists accordingly.
-f, --first
: runs sync for the first time: add MusicBee playcount to Navidrome playcount. If not used, playcount will be updated only if greater than Navidrome's one (see Notes).--csv <path>
: MusicBee CSV source file path. By default if not passed, will look for a file namedMusicBee_Export.csv
in the same folder asmusicbee-navidrome-sync.exe
--datetime-format <format>
: MusicBee CSV datetime format. Default:"DD/MM/YYYY HH:mm"
. Use available formats from https://day.js.org/docs/en/display/format
Updates all albums playcounts and ratings based on existing Navidrome DB.
Updates all artists playcounts and ratings based on existing Navidrome DB
All commands have these options available:
--db <path>
: Navidrome SQLITE .db source file path. By default if not passed, will look for a file namednavidrome.db
in the same folder asmusicbee-navidrome-sync.exe
-u, --user <user_name>
: selects Navidrome username (by default if not used, the first found user will be used)--verbose
: verbose debugging-h, --help
: displays help for command
- This is a one way sync only, from MusicBee to Navidrome. Can't do the other way.
- A backup of your Navidrome DB is created in a newly created
backups
folder everytime you run a command - Updates are only applied when they are more favorable (ex: MusicBee rating > Navidrome rating, MusicBee play date > Navidrome play date...)
- Ratings are updated on certain conditions:
- For tracks: if MusicBee rating is greater than Navidrome rating
- For albums, if more than half of the album tracks are rated (its rating will be the average of available tracks ratings)
- For artists, same as album, will be applied only to artists with more than 1 track
- Tested with the following versions :
- MusicBee:
- 3.5.*
- Advance Tagging and Reporting Tool:
- 5.2.*
- 5.7.*
- 8.0.*
- 9.1.*
- Navidrome:
- 0.47.5
- 0.48.*
- 0.49.*
- 0.50.*
- 0.51.*
- MusicBee:
Maybe build it as a .exe GUI ? If you have any enhancements suggestions, don't hesitate!
If you found this tool useful, if it saved you some time, you can buy me a coffee !
I'm more of a tea (or beer >_>) drinker, but I can appreciate a good coffee too.