How to set directories and name files for vinyl albums (and technically cassettes too) to include the album sides and correct vinyl numbering?

Thank you! That put me on the right track (no pun intended!)

In case this helps anyone else, I first created a variable to check whether something is vinyl and then to set the variable to “Side” (as in Side A or Side B, etc.,) or to “Disc” for everything else.

$noop(
# Change disc text depending on whether something is a Disc or
# Vinyl album.
)
$if($find(%media%,Vinyl),$set(_MediumText,Side),
    $set(_MediumText,Disc)
    )

You don’t have to call it “_MediumText” - call it whatever you want. I just wanted vinyl albums to have a “Side X” directory and CD’s to have a “Disc X” directory.

I then changed this

$set(_nDNum,$if($gt(%_nTotalDiscs%,1),%_PaddedDiscNum%,))

to

$if($in(%media%,Vinyl),$set(_nDNum,$left(%_musicbrainz_tracknumber%,1)),
$set(_nDNum,$if($gt(%_nTotalDiscs%,1),%_PaddedDiscNum%,))
    )

And changed this

$set(_nTNum,$if(%_nDNum%,%_nDNum%-)$if(%_PaddedTrackNum%,%_PaddedTrackNum%. ))

to

$if($in(%media%,Vinyl),$set(_nTNum,%_musicbrainz_tracknumber%. ),
    $set(_nTNum,$if(%_nDNum%,%_nDNum%-)$if(%_PaddedTrackNum%,%_PaddedTrackNum%. ))
    )

The path (in my modified script) looks like this:

$set(_nFilePath,%_cArtistAlbums%/$if(%_aNoArtistSort%,%_vAllAlbumArtists%,%_vAllAlbumArtistsPrimarySort%)/%_nYear% • %_vAlbumTitleAddInfo%$if(%_nDNum%,/%_MediumText% %_nDNum%))

And the file name is like this:

$if($eq(%_isAlbumType%,Standard),$set(_nFileName,%_vPrimaryAlbumArtist% - %_vAlbumTitle% %_nYear% - %_nTNum%%_vTrackTitleAddInfo%%_nFeat%))

Hopefully using the original script linked in my first post gives folks enough to go on if they want to use this sorting for themselves. I’m only a few days new at this so I would imagine there are better/more efficient ways of doing this but this is what I have that works lol :slight_smile:

2 Likes