Music Library and MusicBrainz Picard
homehack.nl
homehack.nl
$if2(%albumartist%,%artist%)/%album%
$if(%originaldate%,\($left(%originaldate%,4)\))/
$if($gt(%totaldiscs%,1),Disc %discnumber%
$if(%discsubtitle%,: %discsubtitle%,)/,)
$num(%tracknumber%,$if($lt(%totaltracks%,10),1,$if($lt(%totaltracks%,100),2,3)))
%title%
I have "Replace non-ASCII characters" and "Windows compatibility" both unchecked. At present I'm kind of 50/50 on single-digit track numbers for albums that have less than 10 tracks, kind of just used to everything being two digits (though I have a handful with greater than 99 tracks, so there's the concession there for triple-digit track numbers).It's also very much optimized for my own use of the file system being my library management. I just change directory and play. ;)
$truncate($if2(%albumartist%,%artist%),143)/$truncate($if($if2(%originaldate%,%date%),$left($if2(%originaldate%,%date%),4) )%album%,143)$if(%discsubtitle%,/$truncate(%discsubtitle%,143))/$truncate($if($gt(%totaldiscs%,1),$if($gt(%totaldiscs%,9),$num(%discnumber%,2),$num(%discnumber%,1))-,)$if($ne(%tracknumber%,),$if($gt(%totaltracks%,99),$num(%tracknumber%,3),$if($gt(%totaltracks%,9),$num(%tracknumber%,2),$num(%tracknumber%,1))),) %title%,138)
I think the truncations are necessary to avoid exceeding filename length limits on some systems. The if2s are to fallback to another field. Similar to yours, there is also logic for zero-padding as needed on discs and track numbers and to omit discs when there is only one.https://picard-docs.musicbrainz.org/v2.7/en/extending/script...
$noop(requires: album-artist script)
$noop(# define once what characters should be removed)
$set(_unwantedchars,[’`'\\"”/\\-\\\\\\|;:\*\\?!&\\[\\]\\{\\}\(\)<>\\\,\\._\$\\#])
$noop(# if the id of release is "Various Artists", or the release is a dj-mix, or there is a djmixer name present, return true) $set(_variousrelease,$if($or($eq(%musicbrainz_albumartistid%,89ad4ac3-39f7-470e-963a-56509c546377),$inmulti(%releasetype%,dj-mix),$ne(%djmixer%,)),true,))
$noop(# if this is a Various Artists release, prepare to return trackartist later in the file path) $set(_trackartist,$replace($strip($if(%_variousrelease%, $rreplace(%artist%,%_unwantedchars%,)-,)), ,_))
$noop(# artist path variable, sort out characters) $set(_releaseartist,$replace($strip($rreplace(%albumartist%,%_unwantedchars%,)), ,_))
$noop(# prefer earliest date in release group over release date, sort out spaces and delimiters) $set(_releasedate,$replace($if(%originaldate%,%originaldate%,%date%),-,_)-)
$noop(# cat name, sort out characters) $set(_catalognumber,$replace($strip($rreplace(%catalognumber%,%_unwantedchars%,)), ,_)-)
$noop(# release name, sort out characters) $set(_releasealbum,$replace($strip($rreplace(%album%,%_unwantedchars%,)), ,_))
$noop(# release disc number, sort out characters) $set(_releasediscnum,$if($gt(%totaldiscs%,1),$num(%discnumber%,$if($gt(%totaldiscs%,99),3,$if($gt(%totaldiscs%,9),2,1)))-,))
$noop(# release track number, sort out characters) $set(_releasetracknum,$num(%tracknumber%,$if($gt(%totaltracks%,99),3,2)))
$noop(# release track name path variable, sort out characters) $set(_releasetrack,$replace($strip($rreplace(%title%,%_unwantedchars%,)), ,_))
$noop(# build the full path up from the variables set above) %_releaseartist%/ %_releaseartist%-%_releasedate%%_catalognumber%%_releasealbum%/ %_releaseartist%-%_releasedate%%_releasealbum%-%_releasediscnum%%_releasetracknum%-%_trackartist%%_releasetrack%
Workings out on https://wiki.thingsandstuff.org/Tagging_script
Also, some of https://github.com/murdos/musicbrainz-userscripts have been handy
If I lost my whole music collection tomorrow, I could recover the actual tracks from Bandcamp/7Digital/rip etc. But my custom tags and ratings that I use to generate playlists, and the history of saved playlists found back over 15 years, would be impossible to recover.
I currently have a workflow like:
1. Add tags, move and rename files using MusicBrainz Picard.
2. Run beets on the files with the writing, tagging and renaming options disabled.
The keys which are left empty in the yaml need to be provided by a local config file like beets -c secrets.yaml. A sample secret file can be seen here[1].
This means that I can still use beets to do things like fetching lyrics (but not writing to ID3 tags), creating smart-playlists, updating my MusicBrainz collections etc.
Due to this workflow you might find that the beets config is lacking a lot of plugins and configuration that would allow it to replace MusicBrainz Picard like the chroma plugin, fetchart etc.
Some of the cooler beets plugins that complement Picard are:
mbsync: It can fetch updated metadata for existing tracks solving my biggest issue with Picard.
lastimport: To import playcounts from Last.fm
smartplaylist: To generate rule-based playlists. Now I can have playlists by decade or by genre or even something like "songs from 2000-2010 with danceability > x (from AcoustID)"
missing: to list missing tracks from an album
[1]: https://github.com/hashhar/picard-beets-config/blob/master/b...
Highly recommended for anyone who always has a terminal window open. It pulls data from MusicBrainz by default, but can also be configured for other sources, such as Discogs.
I also just rsync my music library to an external SSD so that it's backed up, and up-to-date when I'm travelling.
https://beets.readthedocs.io/en/stable/reference/pathformat....
The rich set of plugins are equally amazing. For instance, I use the Playlist plugin, and whenever I update any metadata on a music file that results in a file name change (thus changing the song path), it'll scan my MPD (a completely separate program) created playlists (.m3u) and update the paths for the effected songs. Just one of the many things it automates for me, besides metadata.
Although not the fault of Beets, I wish there was a decent source for Japanese albums. Between metabrainz and discogs, it only gets me 70-80% of the way there. The new Deezer plugin helps with digital only releases but it's not as accurate. Unfortunately I don't have the time to contribute to metabrainz, as that 20% missing is quite large in the context of my library.
At the moment I use smart playlists and generate an "added today" playlist with all the songs imported to beets today, and add that playlist to my queue, appending it to the end of the queue.
beets version 1.5.0
Python version 3.9.9
…is what my beets --version says.Anyway, after automatically trashing the dates on a whole load of albums a while back I stopped using all of those tools.
I have my beets configured to include original_year at the beginning of the album folder name, and then the release year in parenthesis at the end, but only if it is different.
- Picard for import/metadata
- Navidrome for a web interface + Subsonic server
- DSub on Android to play (+ permanent cache for offline playback of various "deserted island" albums)
If you have Poweramp (Android), it can read the cache folder of DSub. This is the best audio configuration I've found thus far. It's great. Navidrome is one of the best software packages I've found recently. Love it. Picard is equally amazing once you get the hang of the UI.
I've tried to use various web-based music streaming servers in the past, but keep finding they fetched their own metadata in the background, ignoring the tags I've curated and modified to my liking.
My impression has been that MusicBrainz has more typos and weirdly formatted metadata than FreeDB. Now that I know more of its background, I'll look into it more. My CD collection is mostly ripped to full-album FLAC + CUE, so correct metadata will likely be an important part of converting to MP3 for streaming.
If you find any issues in MusicBrainz metadata you can submit a correction, which will be reviewed and voted on by community members. I've done this maybe 4-5 times for my collection of about 2000 releases and in each case, my correction was quickly accepted.
MusicBrainz Picard has played a key role in organizing it.
My reasons for starting this home collection was the endless amount of ads and the surprising amount of times content would disappear from the streaming platforms.
Maybe the key pivot is having MusicBrainz actually connect with real artists and have each artist create an NFT for each track they unleash onto the net. Listeners can then donate according to what they listen to most. So artists should leverage the fact that they are the first to own and hold their masters.
Can also apply to video. So a MusicBrainz (SuperBrainz) blockchain? Does that make sense?
I am definitely a contrarian... great to see.
The blockchain entries can also point to a place to get the media for free... eg a P2P network or download page.
Maybe a streaming network could be created as well that actually allowed downloads.