Storing music locally

You'll own nothing. And you'll be happy

In my quest to depend less on cloud services, I've been experimenting with different tools to manage my local music library.

I recently learned about Soulseek, a peer-to-peer file sharing network, and started using it with the Nicotine+ client. I'm quite happy about how useful this is for sharing and expanding your music library, files from media that both parties on the network own, of course. :)

When using this network, you are expected to contribute by sharing your own files, otherwise don't be surprised when people start blocking you from downloading from their libraries. Re-sharing what you download from others is usually enough. Use common sense and don't do things like downloading the entire library of a single person in one go. I recommend checking user profiles before downloading from them.

On Nicotine+ you can configure directories for downloads and shares. I don't recommend using the same directory for both downloads and shares. What I do is setting up a "downloads" directory, and moving the downloaded files to a "shares" directory after the download finishes, using a more organized structure, since users on the network have different naming conventions for their files and directories.

Nicotine+ Downloads section

Nicotine+ Shares section

Of course, doing this manually is tedious, and this is where MusicBrainz Picard comes into play. This program is used for identifying, tagging, and organizing music files. This means that it can identify the files that you downloaded by querying the MusicBrainz database, update the tags, rename or move the files using a consistent file naming format that you can configure in the program.

The top section of the MusicBrainz Picard UI has two columns. The one to the left is where you load the files that you want to process (by clicking "Add Folder...", "Add Files...", or dragging and dropping from your file manager).

MusicBrainz Picard top section

Once these files are loaded, they would normally be in the "Unclustered Files" section. You can click the "Cluster" button, and this will send these files to the "Clusters" section, in a more organized structure.

MusicBrainz Picard unclustered files

MusicBrainz Picard clustered files

You can select files or folders from the left panel and click the "Lookup" button. This will send what you selected to the right panel, and the program will query the MusicBrainz database based on the current metadata of the files you loaded. Once it finishes, you can click on the album or the individual songs in the right panel, and the panel at the bottom of the UI will show the current metadata of the files, and the new values that would override the current, so you can review them before saving the changes.

MusicBrainz Picard lookup

The automatic lookup is not always accurate, and sometimes you would have to make some changes before saving.

A personal preference of mine is setting the date value to the date of the original release. This can be done with a "Tagger Script", on "Options" -> "Options..." -> "Scripting". This does the trick:

$set(date,$if2(%originaldate%,%date%))

MusicBrainz Picard tagger script

Clicking the "Save" button applies the changes that you specify in "Options" -> "Rename Files" / "Move Files" / "Save Tags", so double check before saving.

To configure this file structure that you want to use for the output, you have to use what's called a "file naming script" in MusicBrainz Picard. You can do this by clicking on "Options" -> "Open file naming script editor...". This uses a template language with a syntax similar to the tagger scripts. I wrote this for my library:

$if2(%albumartist%,%artist%)/
$if(%albumartist%,%originalyear% - %album%/,)

$if($gt(%totaldiscs%,1),%discnumber%.,)
$if($and(%albumartist%,%tracknumber%),$num(%tracknumber%,2) - , - )
$if(%_multiartist%,%artist% - ,)
%title%

MusicBrainz Picard fine naming script

After you save, if you enabled moving and renaming, the saved files will be moved to the output directory that you configure on "Options" -> "Options..." -> "File Naming", and will have a structure like this:

Pink Floyd
├── 1977 - Animals
│   └── 01 - Pigs on the Wing, Part 1.flac
└── 1979 - The Wall
    └── 1.01 - In the Flesh_.flac

You can probably guess that my destination directory is going to be "shares". That's correct. :)

To summarize, my workflow looks like this:

  1. Download some album from Soulseek.
  2. Drag the files I downloaded from the "downloads" directory, and drop them to MusicBrainz Picard. Then cluster, lookup, and check that everything makes sense.
  3. Make sure that "Rename Files", "Move Files", and "Save Tags" are all enabled.
  4. Save. This sends the file to the "shares" directory, using the file naming structure that we configured.
  5. Rescan shares on Nicotine+ so that the new files you added to "shares" are immediately available.