Repository for neat file name string patterns and tagger script snippets

This is a fantastic pattern @tdiaz, thanks for publishing it! How would you go about to add the catalogue number to the most peripheral (the “last” one per album) folder?

Do you mean appending it to the album directory or one higher that contains the albums within? That may be the artist named directory, or the subdirectories for file type within the artist directory?

Volume/Music Sorted/B/B-52’s, The/M4A//Bouncing Across the Satellites/01. Track…
/Volume/Music Sorted/B/B-52’s, The/M4A/[catalogue]/Bouncing Across the Satellites [catalogue]/01. Track…

Either way, it’s going to be a scriptmtag droppd in the build process. One would hope there is never a reason for separate catalog numbers per track within an album.

That would be awkward to say the least. But nothing surprises me anymore. :sunglasses:

Hmm, I guess it would make most sense at the album level, so that this would be a great way of separate different pressings/versions of the same album. I’m actually not someone who has lot of these, but I have at least some old Aerosmith records on both vinyl and CD that I’d love to separate.
Anyway, thanks for a great script!

I updated it again. It’s got the Catalogue Number in it, too.

Pretty much every option is turned on, the configurations are all in the first section. You shouldn’t have to mess with the rest unless you want to move something around. I need to update the ‘sample paths’ in there, and a little bit more. I’m sick of looking at this thing right now. :wink:

OTOH, between that and the mods on the backside, I’ve got Picard doing all this anal sorting and labeling that I wanted.

Like I said previously, the target for this script is to put everything of the same name near each other, separated by file formats and to make handling things like duplicate tracks and such still give you a ‘perfect’ set of the album, and push the rest next to it.

Albums with too many tracks are no longer treated as incomplete.

So the only time you’ll see a ‘partial/incomplete’ marked directory is when you don’t have a complete one already. Any added incremental directories of that album themselves do -NOT- have a complete set will -NOT- be marked as incomplete because you already have a complete set.

/Volume/Drive/Music/O/Oingo Boingo/Only a Lad [1981]/ <-- the complete one.
/Volume/Drive/Music/O/Oingo Boingo/Only a Lad [1981] (1)/ <-- Any Duplicates End up here…
/Volume/Drive/Music/O/Oingo Boingo/Only a Lad [1981] (2)/ <-- and here if there’s more than one duplicate of something. It will just roll to the next incremental directory.

I’ll post another in a new post, with a new screen shot example, and the comments/instructions/examples in the script with more details.

4 Likes

Absolutely fantastic, thanks @tdiaz!

MBP YA Magic-Script that does more stuff too - v2.0a .

Now Glutin Free!

This script is setup with more of an overall archival sorting method in mind, from which you can then choose titles by file format directories for your various devices.

e.g.: The name of the Album can be specified at the File Format level, so you don’t have to rename something when you drop it wherever while assembling a library for a specific device, only needing to copy specific stuff to the target location, etc…

You certainly could aim your favorite player/playback method at the Directory Tree created, though most I’m sure will have duplicate entries when there are extra files/formats available at the individual release / Album level.

This can work with the official release of Picard, however the handling of duplicate tracks, whole albums, etc., will not be by seperate directories unless you roll your own build with the modification referenced in a previous post. This would also affect the duplicate albums with too many tracks, where they will still all be placed in the same directory as opposed to be separated. Though the directory will still not be marked ‘Incomplete’, as there is -at least- a full album within it.

• Albums, Singles, EP, Live, Compilations, etc. Separated within the Artists directory.

• Albums with too many tracks will not be marked as incomplete and will be handled the same as a complete album.

• Separate Root directory for compilations with option for single artist compilations to be placed with the artist instead of compilations.

~/MusicRoot/[O]/Oingo Boingo/[Artist Compilations]/

Root directory Audio Books, Podcasts, Others

~/MusicRoot/Compilations/K-Tel Hits of the 1980s Vol. 1
~/MusicRoot/Audio Books/Ready Player One
~/MusicRoot/Podcasts/Mad Mad Music #29

Optional handling for Cover / Tribute releases. Place them within a specified Artist subdirectory.

$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★ MBP YA Magic-Script that does more stuff too. - v2.1a - amd/17500mph ★)
$noop(★                                                                      ★)
$noop(★ Here is a script for music renaming in MusicBrainz Picard            ★)
$noop(★                                                                      ★)
$noop(★ Features :                                                           ★)
$noop(★                                                                      ★)
$noop(★   Individualy Selectable Root Directory Organization Options:        ★)
$noop(★                                                                      ★)
$noop(★ • Directories by [A]rtist Name / [N]ame, Artist or last.fm** category★)
$noop(★ • subDirectory for each main type [Album/Single/EP...]               ★)
$noop(★ • Separate Root directory for compilations [!various]                ★)
$noop(★ • Single Artist Compilations go in Artist Directory                  ★)
$noop(★ • Root directory Audio Books, Podcasts, Others                       ★)
$noop(★                                                                      ★)
$noop(★  ~/MusicRoot/[O]/Oingo Boingo/[Artist Compilations]/                 ★)
$noop(★  ~/MusicRoot/Compilations/K-Tel Hits of the 1980s Vol. 1             ★)
$noop(★  ~/MusicRoot/Audio Books/Ready Player One                            ★)
$noop(★  ~/MusicRoot/Podcasts/Mad Mad Music #29                              ★)
$noop(★                                                                      ★)
$noop(★ - Alphabetize artist without leading "The"                           ★)
$noop(★ - Show Album Release Status on Album Directory                       ★)
$noop(★ - Show Record Label on Directory Name Directory                      ★)
$noop(★ - Show Catalogue Number in Album Directory Name                      ★)
$noop(★ - Show Track Duration in Filename                                    ★)
$noop(★ - Filtered character for files & directory naming                    ★)
$noop(★ - Include media type in directory name [when its not CD]             ★)
$noop(★ - Multi-Disc SubDirectory per Disc in Album Directory                ★)
$noop(★ - Custom directory tag for multi-disc CD/Vinyl [CD1/Disc1 by default]★)
$noop(★ - Put multi-CD release in same directory [names become 101/102/201..]★)
$noop(★ - Vinyl can use musicbrainz style for track [A1/A2/B1...]            ★)
$noop(★ - File Type SubDirectory in Album Directory                          ★)
$noop(★                                                                      ★)
$noop(★ ** Optional Plugin Needed for Last.fm [for category trending]        ★)
$noop(★   -> https://github.com/fdemmer/Picard-Last.fm.ng-Plugin             ★)
$noop(★                                                                      ★)
$noop(★ - DevMode:                                                           ★)
$noop(★   Allows better simulation control of variables for debugging        ★)
$noop(★                                                                      ★)
$noop(★ Do Not Taunt The Happy Tagging Ball                                  ★)
$noop(★                                                                      ★)
$noop(★----------------------------------------------------------------------★)
$noop(★   Based on the MBP Magic Script  By Ski-lleR                         ★)
$noop(★   Thanks to avibrazil for his filter                                 ★)
$noop(★ > https://github.com/avibrazil/picard-scripting                      ★)
$noop(★----------------------------------------------------------------------★)
$noop(★                                                                      ★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★ INSERT COIN ★)

$noop(Configuration Section - 0-Disable / 1-Enable)

$noop(★ GLOBAL ★)

$noop(★ Sort orderTypeForRoot ★)
$noop(★ ~/Music/Last.fm Genre/A/Artist/AlbumTitle/ ★)
$noop(★  1: Category [Last.fm.ng] ★)
$noop(★ ~/Music/A/Artist/AlbumTitle/ ★)
$noop(★  2: Artist first letter ★)
$set(_orderTypeForRoot,2)


$noop(★ Sort orderTypeForArtist ★)
$noop(★  1: First letter of first name ★)
$noop(★ ~/Music/M/Music Artist/AlbumTitle/  ★)
$noop(★  2: First letter of last name ★)
$noop(★ ~/Music/A/Artist, Music/AlbumTitle/  ★)
$set(_orderTypeForArtist,2)

$noop(★ How to designate Complete Albums that contain multiples of at least 1 Track 1 ★)
$noop(★ 0, They are Handled as InComplete ★)
$noop(★ 1  They are Handled as Complete w/starred but not Gold icon★)
$set(_extraTrackHandling,1)


$noop(★ 1  Earlier in the Sort Artist Diversion?★)
$set(_earlierLevelArtistSeparation,0)
$noop(★ 0  Earlier in the Sort Incomplete Diversion?★)
$set(_earlierPresortForIncompletes,1)

$noop(★ Do you want separation by type / extension at the Root Level? ★)
$noop(★ ~/Music/MP3/AlbumTitle/ - ~/Music/FLAC/AlbumTitle/ - ~/Music/M4A/AlbumTitle/ - ~/Music/WNA/AlbumTitle/ ★)
$set(_rootLevelTypeSeparation,0)

$noop(★ Do you want separatation by type / extension at the Album Level? ★)
$noop(★ ~/Music/AlbumTitle/MP3/ - ~/Music/AlbumTitle/FLAC/ - ~/Music/AlbumTitle/M4A - ~/Music/AlbumTitle/WNA/ ★)
$set(_albumLevelTypeSeparation,1)

$noop(★ Do you want the Album Title added before the type / extension after the Album Level? ★)
$noop(★ ~/Music/AlbumTitle/AlbumTitle MP3/ - ~/Music/AlbumTitle/AlbumTitle FLAC/ - ~/Music/AlbumTitleAlbumTitle /M4A ★)
$set(_albumNameAtTypeSeparation,1)

$noop(Album Name/EP/Single/Live/Album etc.)
$noop(★ ~/Music/AlbumTitle/AlbumTitle MP3/Single/ - ~/Music/AlbumTitle/AlbumTitle FLAC/EP/ ★)
$set(_separateByTypeInArtistDirectory,1)

$noop(★ Do you want Tribute and Cover Albums Placed with Artist being attributed? ★)
$noop(★ ~/Music/AlbumTitle/AlbumTitle MP3/Cover/ - ~/Music/AlbumTitle/AlbumTitle FLAC/Tribute/ ★)
$noop(★ Requires Custom Use of AlbumArtistSort and ArtistSort Tags ★)
$noop(Enter “Tribute” or “Cover” in the Album Sort as field.)
$noop(Enter the Artist in the Album Artist Sort as field.)
$set(_altArtistSort,1/)

$set(_separateAlbum,0) $noop(Albums in SubDirectory as well)
$noop(★ ~/Music/A/Artist, Music/Album/AlbumTitle ★)

$set(_compilationsGSubDirectory,Compilations/)
$noop(★ ~/Music/Compilations/  ★)

$noop(★ SOUNDTRACK/VARIOUS DIRECTORY ★)
$set(_soundTracksDirectory,Soundtrack/)
$set(_variousArtistsDirectory,Various/)
$set(_audiobooksDirectory,Audiobook/)
$set(_incompleteDirectory,Partial)
$set(_podcastSubDirectory,Podcast/)

$noop(★ Multi-Disc ★)

$noop(★ ~/Music/A/Artist, Music/AlbumTitle/Disc01/01 - Tracklist ★)
$set(_useSubDiscDirectory,1)

$noop(★ ~/Music/A/Artist, Music/AlbumTitle/01 - Tracklist ***SKIP SubDiscDirectory if only one Medium in Realease ★)
$set(_mergeDiscWhenNotUsingSubDirectory,0)

$set(_showDiscSubtitle,1)
$set(_nameForTypeCD,Disc)
$set(_nameForTypeVinyl,Side)

$noop(★ ~/Music/A/Artist, Music/AlbumTitle/A1 ,A2 ,B1, B2 Tracklist - ★)
$set(_useMusicBrainzStyleForVinylTrack,1)

$noop(★ Custom Subdirectory Titles at Artist Level ★)
$noop(★ ~/Music/A/Artist, Music/EP/AlbumTitle ~/Music/A/Artist, Music/Live/AlbumTitle ★)


$set(_albumSubDirectory,Album/)
$set(_compilationsASubDirectory,Compilation/)
$set(_coverSubDirectory,[Cover]/)
$set(_tributeSubDirectory,[Tribute]/)
$set(_singlesSubDirectory,[Single]/)
$set(_liveSubDirectory,[Live]/)
$set(_epSubDirectory,[EP]/)
$set(_broadcastSubDirectory,[Broadcast]/)
$set(_videoSubDirectory,[Video]/)
$set(_otherSubDirectory,[Others]/)
$set(_extDirectory,%_extension%/)

$noop(★ Other Values Included in Filename ★)
$set(_showRecordLabel,1)
$set(_showTime,1)
$set(_showDate,1)
$set(_showReleaseStatus,1)
$set(_showBandwidth,1)
$set(_showCatalogueNumber,1)

$noop(★ For Development Only - Variable Settings in Subsections ★)
$noop(★ Where Available - Audio Metrics Only at this Time ★)
$set(_devMode,0)
$noop(####################### Scratch Space ######################)
$noop( )
$noop(####################### END SETTINGS #######################)

$noop(★ Unless you're changing appearances, there isn't really anything to do past here ★)

$noop(########## DETECT MUSIC TYPE ###############################)

$noop(★ Detect Album ★)
$if($in(%releasetype%,album),
  $set(_isAlbum,1)
)
$noop(★ Detect Single ★)
$if($in(%releasetype%,single),
  $set(_isSingle,1)
)
$noop(★ Detect Live ★)
$if($in(%releasetype%,live),
  $set(_isLive,1)
)
$noop(★ Detect EP ★)
$if($in(%releasetype%,ep),
  $set(_isEP,1)
)
$noop(★ Detect Broadcast ★)
$if($in(%releasetype%,broadcast),
  $set(_isBroadcast,1)
)
$noop(★ Detect Artist Compilation ★)
$if($in(%releasetype%,compilation),
  $set(_isArtistCompil,1)
)
$noop(★ Detect Audiobook ★)
$if($in(%releasetype%,audiobook),  $set(_isAudiobook,1)
)
$noop(★ Detect Other ★)
$if($in(%releasetype%,other),
  $set(_isOther,1)
)
$noop(★ Detect Tribute ★)
$if($in(%albumsort%,Tribute),
  $set(_isTribute,1)
)
$noop(★ Detect Cover ★)
$if($in(%albumsort%,Cover),
  $set(_isCover,1)
)
$noop(★ Detect Podcast ★)
$if($in(%genre%,Podcast),
  $set(_isPodcast,1)
)
$noop(★ Detect Soundtrack ★)
$if($in(%releasetype%,soundtrack),
  $set(_isSoundTrack,1)
)
$noop(★ Detect Incomplete ★)
$if($eq($is_complete(),0),
  $set(_isIncomplete,1)
)
$noop(★ Detect Video ★)
$if($eq($is_video(),0),
  $set(_isVideo,1)
)
$noop(★ Detect Various Artist ★)
$if($eq(%albumartist%,Various Artists),
  $set(_isVarious,1)
)
$noop(★ Re-detect Compilation Type ★)
$if($eq(%compilation%,1),
  $set(_isGlobalCompil,1)
)
$noop(★ Detect Global Compilation ★)
$if($eq(%_isGlobalCompil%,1), $set(_isArtistCompil,0)
)

$noop(★ Get Track Length ★)
$if($eq(%_showTime%,1),
$noop($set(_trackLength,%length%))
)
$noop(########## Start TAG Manipulation ##########################)
$noop(★ Organize artist by alphabetical Directories excluding leading The ★)
$set(albumartist,$if($eq($left(%albumartist%,4),The ),%albumartistsort%,%albumartist%))
$set(_originalFileName,%_filename%)

$noop(########## Start TAG Formatting  ###########################)
$noop(★ Typography for tags: changes will affect tags on media ★)

$noop(★ ... ➡ …)
$set(album,$replace(%album%,...,…))
$set(title,$replace(%title%,...,…))
$set(discsubtitle,$replace(%discsubtitle%,...,…))

$noop(★ No. ➡ №)
$set(album,$replace(%album%, [Nn]o.\\s*\(\\d\), №\\1))
$set(title,$rreplace(%title%, [Nn]o.\\s*\(\\d\), №\\1))
$set(discsubtitle,$replace(%discsubtitle%, [Nn]o.\\s*\(\\d\), №\\1))

$noop(★ [digit]" ➡ [digit]″)
$set(discsubtitle,$rreplace(%discsubtitle%,\(\\d\)",\\1''))

$noop(★ "12" Vinyl" ➡ "12 Inch Vinyl")
$set(media,$rreplace(%media%,\(\\d\)",\\1 Inch))
$set(album,$rreplace(%album%,\(\\d\)",\\1 Inch))
$set(title,$rreplace(%title%,\(\\d\)",\\1 Inch))

$noop(★ "something" ➡ “something” single quote for server/samba)
$set(albumartist,$rreplace(%albumartist%,"\(.*?\)",'\\1'))
$set(artist,$rreplace(%artist%,"\(.*?\)",'\\1'))
$set(albumartistsort,$rreplace(%albumartistsort%,"\(.*?\)",'\\1'))
$set(artistsort,$rreplace(%artistsort%,"\(.*?\)",'\\1'))
$set(album,$rreplace(%album%,"\(.*?\)",'\\1'))
$set(title,$rreplace(%title%,"\(.*?\)",'\\1'))
$set(discsubtitle,$rreplace(%discsubtitle%,"\(.*?\)",'\\1'))

$noop(########## Start File Naming Structure Variables ###########)

$noop(★ Typography on file naming only ★)
$set(_titleForFilename,%title%)
$set(_albumForFilename,%album%)
$set(_discsubtitleForFilename,%discsubtitle%)
$set(_albumartistForFilename,%albumartist%)
$set(_artistForFilename,%artist%)
$set(_albumartistsortForFilename,%albumartistsort%)
$set(_artistsortForFilename,%artistsort%)

$noop(★ # ➡ ♯)
$set(_titleForFilename,$replace(%_titleForFilename%,#,♯))
$set(_albumForFilename,$replace(%_albumForFilename%,#,♯))
$set(_discsubtitleForFilename,$replace(%_discsubtitleForFilename%,#,♯))

$noop(★ ;: ➡ h, m,)
$set(_trackLength,$replace(%_trackLength%,:,m))

$noop(★ : ➡ ∶)
$set(_titleForFilename,$replace(%_titleForFilename%,:,∶))
$set(_albumForFilename,$replace(%_albumForFilename%,:,∶))
$set(_discsubtitleForFilename,$replace(%_discsubtitleForFilename%,:,∶))
$set(_artistForFilename,$replace(%_artistForFilename%,:,∶))
$set(_albumartistForFilename,$replace(%_albumartistForFilename%,:,∶))
$set(_artistsortForFilename,$replace(%_artistsortForFilename%,:,∶))
$set(_albumartistsortForFilename,$replace(%_albumartistsortForFilename%,:,∶))

$noop(★ ? ➡ ⁇)
$set(_titleForFilename,$replace(%_titleForFilename%,?,⁇))
$set(_albumForFilename,$replace(%_albumForFilename%,?,⁇))
$set(_discsubtitleForFilename,$replace(%_discsubtitleForFilename%,?,⁇))
$set(_artistForFilename,$replace(%_artistForFilename%,?,⁇))
$set(_artistsortForFilename,$replace(%_artistsortForFilename%,?,⁇))

$set(_titleForFilename,$replace(%_titleForFilename%,|,│))
$set(_albumForFilename,$replace(%_albumForFilename%,|,│))
$set(_discsubtitleForFilename,$replace(%_discsubtitleForFilename%,|,│))

$set(_titleForFilename,$replace(%_titleForFilename%,>,>))
$set(_albumForFilename,$replace(%_albumForFilename%,>,>))
$set(_discsubtitleForFilename,$replace(%_discsubtitleForFilename%,>,>))

$set(_titleForFilename,$replace(%_titleForFilename%,<,<))
$set(_albumForFilename,$replace(%_albumForFilename%,<,<))
$set(_discsubtitleForFilename,$replace(%_discsubtitleForFilename%,<,<))

$set(_titleForFilename,$replace(%_titleForFilename%,*,✱))
$set(_albumForFilename,$replace(%_albumForFilename%,*,✱))
$set(_discsubtitleForFilename,$replace(%_discsubtitleForFilename%,*,✱))
$set(_artistForFilename,$replace(%_artistForFilename%,*,✱))
$set(_albumartistForFilename,$replace(%_albumartistForFilename%,*,✱))
$set(_artistsortForFilename,$replace(%_artistsortForFilename%,*,✱))
$set(_albumartistsortForFilename,$replace(%_albumartistsortForFilename%,*,✱))

$set(_titleForFilename,$replace(%_titleForFilename%,&,&))
$set(_albumForFilename,$replace(%_albumForFilename%,&,&))
$set(_discsubtitleForFilename,$replace(%_discsubtitleForFilename%,&,&))
$set(_artistForFilename,$replace(%_artistForFilename%,&,&))
$set(_albumartistForFilename,$replace(%_albumartistForFilename%,&,&))
$set(_artistsortForFilename,$replace(%_artistsortForFilename%,&,&))
$set(_albumartistsortForFilename,$replace(%_albumartistsortForFilename%,&,&))
$noop(★ For Development Only - Variable Settings in Subsections ★)
$noop(★ Where Available - Audio Metrics Only at this Time ★)

$noop(########### Audio Metrics Setup  ###########################)
$noop(########### DevMode Values Only ############################)

$set(_devMode,0) $noop(This one is here for convenience, for now this works here, too. But it will need to go later.)

$set(_biitrate,192)
$set(_saample_rate,44100)
$set(_biits_per_sample,16)
$set(_chaannels,2)
$set(_tiitle,My Great Score)
$noop(########### CONFIRM DevMode is Disabled for Live Use ########)
$noop({%title% - %_bitrate% - %_sample_rate% - %_bits_per_sample% - %_channels%})

$if($eq(%_devMode%,1),$set(_bitRateValue,$left(%_biitrate%,3)),$set(_bitRateValue,$left(%_bitrate%,3)))
$if($eq(%_devMode%,1),$set(_bitRateSpeed,%_saample_rate%KHz),$set(_bitRateSpeed,%_sample_rate%KHz ))
$if($eq(%_devMode%,1),$set(_bitsPerSample,[%_biits_per_sample%]bit),$set(_bitsPerSample,[%_bits_per_sample%]bit ))
$if($eq(%_devMode%,1),$set(_audioChannels,%_chaannels%ch]),$set(_audioChannels,%_channels%ch]))
$if($eq(%_devMode%,1),$set(_titleForFilename,%title%),$set(_titleForFilename,%title%))

$noop({%title% - %_bitRateValue% - %_bitRateSpeed% - %_bitsPerSample% - %_audioChannels% - %_titleForFilename% - %_fileCBRRate% - %_fileVBRRate% -  %_bitrate% - %_biitrate%})

$noop(Bitrate factors of 8.0 are CBR, Anything else is VBR)

$set(_bitRateType,$if($eq_any(%_bitRateValue%,320,256,224,192,160,128,112,96,80,64,56,48,40,32,24,16,8),CBR $set(_cbrRateValue,%_bitRateValue%),VBR $set(_vbrRateValue,%_bitRateValue%)))

$noop(Bitrate factors of 8.0 are most likely CBR with the remainder being VBR)

$if($eq(%_cbrRateValue%,320),$set(_fileCBRRate,320 ),
$if($eq(%_cbrRateValue%,256),$set(_fileCBRRate,256 ),
$if($eq(%_cbrRateValue%,224),$set(_fileCBRRate,224 ),
$if($eq(%_cbrRateValue%,192),$set(_fileCBRRate,192 ),
$if($eq(%_cbrRateValue%,160),$set(_fileCBRRate,160 ),
$if($eq(%_cbrRateValue%,128),$set(_fileCBRRate,128 ),
$if($eq(%_cbrRateValue%,112),$set(_fileCBRRate,112 ),
$if($eq(%_cbrRateValue%,96),$set(_fileCBRRate,96 ),
$if($eq(%_cbrRateValue%,80),$set(_fileCBRRate,80 ),
$if($eq(%_cbrRateValue%,64),$set(_fileCBRRate,64 ),
$if($eq(%_cbrRateValue%,56),$set(_fileCBRRate,56 ),
$if($eq(%_cbrRateValue%,48),$set(_fileCBRRate,48 ),
$if($eq(%_cbrRateValue%,40),$set(_fileCBRRate,40 ),
$if($eq(%_cbrRateValue%,32),$set(_fileCBRRate,32 ),
$if($eq(%_cbrRateValue%,24),$set(_fileCBRRate,24 ),
$if($eq(%_cbrRateValue%,16),$set(_fileCBRRate,16 ),
$if($eq(%_cbrRateValue%,8),$set(_fileCBRRate,8 ),
										      )))))))))))))))))

$if($eq(%_bitRateType%,VBR)$set(_fileVBRRate,%_vbrRateValue% ) ,
$if($gt(%_vbrRateValue%,319),$set(_fileVBRRate,320+ ),
$if($gt(%_vbrRateValue%,220),$set(_fileVBRRate,V0 ),
$if($gt(%_vbrRateValue%,191),$set(_fileVBRRate,V1 ),
$if($gt(%_vbrRateValue%,170),$set(_fileVBRRate,V2 ),
$if($gt(%_vbrRateValue%,150),$set(_fileVBRRate,V3 ),
$if($gt(%_vbrRateValue%,140),$set(_fileVBRRate,V4 ),
$if($gt(%_vbrRateValue%,130),$set(_fileVBRRate,V5 ),
$if($gt(%_vbrRateValue%,120),$set(_fileVBRRate,V6 ),
												)))))))))
$noop(######### File Naming Structure Variables Complete #########)



$noop(★ Pathname Generation Starts Here ★)

$noop(★ Root level Path ★)
$noop(   root = '/Volumes/Drive/Music/ ... [Destination Directory Setting])


$noop(★ Separate by Format at root directory ★)
$noop(   rootLevelPath/MP3/Artist/Album ...)
$if($eq(%_rootLevelTypeSeparation%,1),$upper(%_extension%),)

$noop(   Earlier Incomplete Separation for Sorting ...)
$if($eq(%_earlierPresortForIncompletes%,1),$if($eq($is_complete(),0),$if($lt($matchedtracks(),%_totalalbumtracks%),# - %_incompleteDirectory%)),$if(%_isIncomplete%,# - %_incompleteDirectory%,))/
$if($eq(%_earlierLevelArtistSeparation%,1),%_artistForFilename%/)

$noop(★ Soundtrack in custom directory ,after soundtracksDirectory?? ★)
$noop(   root/*/Audio Books/Title ...)
$noop(   root/*/Soundtracks/Title ...)
$noop(   root/*/Podcasts/Title ...)
$if(%_isSoundTrack%,%_soundTracksDirectory%$left($swapprefix(%album%,A,An,The),1)/,/
$if(%_isAudiobook%,%_audiobooksDirectory%$left($swapprefix(%album%,A,An,The),1)/,/)
$if(%_isPodcast%,%_podcastDirectory%$left($swapprefix(%album%,A,An,The),1)/,/)

$noop(★ Various in custom directory ★)
$noop(root/<*>/Various)
$if(%_isVarious%,%_variousArtistsDirectory%$left($swapprefix(%album%,A,An,The),1)/,/
	$if(%_isGlobalCompil%,%_compilationsGSubDirectory%$left($swapprefix(%album%,A,An,The),1)/,/)
	$noop(★ Order root by category ★)
	$if($eq(%_orderTypeForRoot%,1),
	$if2(%albumgrouping%,Unknown)
	)/

$noop(★ Order root by artist ★)
$noop(root/<*>/<Last.FM=>/)
$noop(root/<*>/D/)
$if($eq(%_orderTypeForRoot%,2),
	$if($eq(%_orderTypeForArtist%,1),
		$upper($firstalphachar($if2(%_albumartistForFilename%, %_artistForFilename%),#)),
	$if($eq(%_orderTypeForArtist%,2),
		$if(%_isGlobalCompil%,,$upper($firstalphachar($if2(%_albumartistsortForFilename%, %_artistsortForFilename%),#)))
	))
)/

$noop(★ Artist with first letter of first name ★)
$noop(root/<*>/B/The B-52's)
$if($eq(%_orderTypeForArtist%,1),
$if2(%_artistSort%,%_albumartistForFilename%,%_artistForFilename%)
)/

$noop(★ Artist with first letter of last name ★)
$noop(root/<*>/B/B-52's, The)
$if($eq(%_orderTypeForArtist%,2),
$if(%_isGlobalCompil%,,$if2(%_albumartistsortForFilename%,%_artistsortForFilename%))
)/


$noop(★ Using Alternate Artists Directory For Covers & Tributes  **Uses Order for Album Artist tag [Field]★)

	$noop(root/<*>/O/Oingo Boingo/[Tributes]/DeadBandsParty)
	$if($eq_all(%_orderTypeForArtist%,%_isTribute%,1),
	$if2(%_artistSort%,%_albumartistForFilename%,%_artistForFilename%)
	)/

	$noop(root/<*>/D/DEVO/[Covers]/Devolution)
	$if($eq_all(%_orderTypeForArtist%,%_isCover%,1),
	$if2(%_artistSort%,%_albumartistForFilename%,%_artistForFilename%)
	)/
	$noop(★ Organize by type ★)
	$noop(root/<*>/Y/Yes/[Live]/90125 Live)
	$noop(root/<*>/Y/Yes,/90125)
	$if($eq(%_separateByTypeInArtistDirectory%,1),
		$if($eq(%_isArtistCompil%,1),%_compilationsASubDirectory%,
			$if($eq(%_isLive%,1),%_liveSubDirectory%,
				$if($eq(%_isCover%,1),%_coverSubDirectory%,
					$if($eq(%_isTribute%,1),%_tributeSubDirectory%,
						$if($eq(%_isEP%,1),%_epSubDirectory%,
							$if($eq(%_isSingle%,1),%_singlesSubDirectory%,
								$if($eq(%_isBroadcast%,1),%_broadcastSubDirectory%,
									$if($eq(%_isVideo%,1),%_videoSubDirectory%,
										$if($eq(%_isOther%,1),%_otherSubDirectory%,
											$if($eq(%_isAlbum%,1),
											$if($eq(%_separateAlbum%,1),%_albumSubDirectory%))

											))))))))))))

$noop(root/<*>/B/B-52's, The]/Bouncing off the Satellites/ )
%_albumForFilename%
$noop(★ Bouncing off the Satellites [Media-Type]/ ★)
$noop($if($ne(%media%,CD),$if(%media%,[$rreplace(%media%,["″], Inch)])))
$if(%media%, [$title(%media%]),)

$noop($if($and(%media%,$ne(%media%,CD)),$if($in(%media%,Vinyl),$title( [%media%])),$upper( [%media%])))

$noop(★ Bouncing off the Satellites [Vinyl] [YEAR]/ ★)
$if($eq(%_showDate%,1),$if($if2(%date%,%originalyear%,%originaldate%), [$left($if2(%date%,%originalyear%,%originaldate%),4)], [0000]))
$noop(★ Bouncing off the Satellites [Vinyl] [1986] [Release Status]/ ★)
$if(%releasestatus%,$if($eq(%_showReleaseStatus%,1),$title( [%releasestatus%])))

$noop(★ Bouncing off the Satellites [Vinyl] [1986] [Official] [Label]/ ★)
$if(%label%,$if(%_showRecordLabel%, $if(%label%,$title([%label%]))))

$noop(★ Bouncing off the Satellites [Vinyl] [1986] [Official] [MCA] [CAT-Number]/ ★)
$if(%catalognumber%,$if($eq(%_showCatalogueNumber%,1),$title( [%catalognumber%])))

$noop(★ Bouncing off the Satellites [Vinyl] [1986] [Official] [MCA] [AB-DC001]/ ★)
$noop(★ Bouncing off the Satellites [Vinyl] [1986] [Official] [MCA] [AB-DC001] - Incomplete/ ★)
$if($eq(%_extraTrackHandling%,1),$if($eq($is_complete(),0),$if($lt($matchedtracks( ),%_totalalbumtracks%), - %_incompleteDirectory%)),$if(%_isIncomplete%, - %_incompleteDirectory%,))/

$noop(★ Bouncing off the Satellites [Vinyl] [1986] [Official] [MCA] [AB-DC001]/ MP3 / ★)
$noop(★ Bouncing off the Satellites [Vinyl] [1986] [Official] [MCA] [AB-DC001]/ Bouncing off the Satellites MP3 / ★)
$if($eq(%_albumLevelTypeSeparation%,1),$if($eq(%_albumNameAtTypeSeparation%,1),%_albumForFilename% ,)$upper(%_extension%))/

$noop(★ Bouncing off the Satellites [Vinyl] [1986] [Official] [MCA] [AB-DC001]/ .../ Disc # ★)
$if($gt(%totaldiscs%,1),$noop(
	)$if($lt(%totaldiscs%,10),$set(_discnumber, %discnumber%),$set(_discnumber,$num(%discnumber%,2)))$noop(
	)$if($in(%media%,Vinyl),$noop(
		)$set(_nameForDiscDirectory,@OSLASH@@OBRACKET@%_nameForTypeVinyl%%_discnumber%@CBRACKET@),$noop(
		)$set(_nameForDiscDirectory,@OSLASH@@OBRACKET@%_nameForTypeCD%%_discnumber%@CBRACKET@))$noop(
		)$if($and(%_discsubtitleForFilename%,$eq(%_showDiscSubtitle%,1)),$set(_nameForDiscDirectory,%_nameForDiscDirectory% - %_discsubtitleForFilename%))$noop(
		)$if($eq(%_useSubDiscDirectory%,1),$noop(
			)$set(_nameForDiscDirectory,$replace(%_nameForDiscDirectory%,@OSLASH@@OBRACKET@,/))$noop(
			)$set(_nameForDiscDirectory,$replace(%_nameForDiscDirectory%,@CBRACKET@,)),$noop(
			)$if($eq(%_mergeDiscWhenNotUsingSubDirectory%,1),$noop(
				)$unset(_nameForDiscDirectory),$noop(
				)$set(_nameForDiscDirectory,$replace(%_nameForDiscDirectory%,@OSLASH@@OBRACKET@,[))$noop(
			)$set(_nameForDiscDirectory,$replace(%_nameForDiscDirectory%,@CBRACKET@,]))$noop(
		))$noop(
	))$noop(
)$if(%_nameForDiscDirectory%,%_nameForDiscDirectory%))/

$noop(★ Track # Title --%_filebr% -- %bitrate% -- %BRType% -- %BrVBR% --  ★)
$if($in(%media%,Vinyl),$noop(
	)$if($eq(%_useMusicBrainzStyleForVinylTrack%,1),$noop(
		)$if(%_musicbrainz_tracknumber%,%_musicbrainz_tracknumber%. )$noop(
	)),$noop(
	)$if(%tracknumber%,$if($gt(%totaldiscs%,1),$if($and($eq(%_useSubDiscDirectory%,0),$eq(%_mergeDiscWhenNotUsingSubDirectory%,1)),%discnumber%))$num(%tracknumber%,2). ))

$noop(★ GAME OVER ★)
%_titleForFilename% 
$if($eq(%_showTime%,1),[%_length%] )
$if($eq(%_showBandwidth%,1),[%_fileCBRRate%%_fileVBRRate%%_bitRateSpeed%%_bitRateType%%_audioChannels%])

$noop(★ 00 CREDITS ★)


Root sorting by Artist or performance type, then separated by file format.

Root sorting by file format, then Artist, performance types, etc.
20%20AM

Cover Band & Tribute Releases can optionally be placed in a subdirectory with the Artists they are associated with instead of by their own artists name. This is done by using the sort as tag options.

Enter “*Tribute” or "Cover" in the Album Sort as tag.
Enter the Artist in the Album Artist Sort as tag.

There are also a couple of settings marked Earlier in the Sort. These are for quick and dirty changes to isolate incomplete stuff separately within the output directory instead of along side their complete albums, and to add the artist earlier in when doing that.

Put some incomplete, complete and ‘over-complete’ (complete’s with additional duplicate tracks) on the Right side and save them to see what the differences are with the Earlier Sort and Complete Albums with additional duplicate tracks.

Last.fm plug-in required for using their catagories at the root, instead of Artist names.

…and for the handling of duplicates as shown in the screenshot, see:

2 Likes

@tdiaz Checked out your script above pretty cool but I am getting empty brackets when there is no value in a lot of the directories!

That’s interesting, as anything in those brackets is created from what I’m reading off the files.

Examples:
09. EULA Dancing [3m03s] [320 44100KHz VBR 2ch].mp3
01. Drunken Lullabies [3m51s] [106 44100KHz VBR 2ch].m4a
01. Dead Man's Party [6m22s] [945 44100KHz VBR 2ch].flac
03. Deadbeat Club [4m50s] [974 44100KHz VBR 2ch].m4a

The thing I’m not sure is working right is that VBR where it could be a CBR. … those are mostly for quick visual comparing anyway.

The only Plug-in needed is the Last.fm one, if you want that. I’m pretty sure that nothing else is coming from a plug-in.

Out of curiosity mainly, I wonder what I’d get if I run some of the same files you are getting blanks from… All that stuff is part of any proper file. ,

Well here’s my current one, developed over the past 15 years or so:

$noop(<!-- MusicBrainz Picard Tagger script -->)
$noop(<!-- 2019-10-17 Version 0.11 by Moonbase -->)
$noop(<!-- You should have plugin lastfmng enabled and set up -->)
$noop(<!-- This script also works with Picard 2.x/lastfmng 2.x -->)

$noop(<!-- Remove "Various Artists" on compilations – good for Logitech Mediaserver/SqueezeCenter -->)
$noop(<!-- We use the MB albumartistid for identification because there IS an artist called "Various Artists" -Torsten Pröfrock- -->)
$if($and($eq(%compilation%,1),$eq(%musicbrainz_albumartistid%,89ad4ac3-39f7-470e-963a-56509c546377)),$unset(albumartist) $unset(albumartistsort))

$noop(<!-- Set Original Year and Decade to date of first known release -- instead of using the date of THIS release  -->)
$noop(<!-- Picard/Mutagen will automatically store originalyear as ID3v2.3 TORY [YYYY] or ID3v2.4 TDOR [YYYY-MM-DD], -->)
$noop(<!-- depending on which ID3v2 version is used. Additionally, a TXXX:originalyear tag gets saved for ID3v2,     -->)
$noop(<!-- respectively ORIGINALYEAR for OGG and FLAC files.                                                         -->)
$noop(<!-- Plugin lastfmng sets originaldate to the first known track release year from last.fm                      -->)
$if(%originaldate%,$set(originalyear,$left(%originaldate%,4)))
$noop(<!-- It may happen that we have NO originaldate from the plugin but originalyear from Picard, so base Decade on that -->)
$if(%originalyear%,$set(comment:Songs-DB_Custom1,$left(%originalyear%,3)0s))
$noop(<!-- Fallback: If we have originalyear BUT NOT originaldate, put the originalyear back into originaldate       -->)
$if($and(%originalyear%,$not(%originaldate%)),$set(originaldate,%originalyear%))

$noop(<!-- For a single track, if we couldn't find a grouping and/or genre, set it to the album's grouping and genre -->)
$if(%grouping%,,$setmulti(grouping,%albumgrouping%))
$if(%genre%,,$setmulti(genre,%albumgenre%))

$noop(<!-- Plugin lastfmng sets some album-related tags: we do not want these                           -->)
$unset(albumgenre)
$unset(albumgrouping)
$unset(albummood)
$unset(comment:Songs-DB_Occasion_album)
$unset(comment:Songs-DB_Custom1_album)
$unset(comment:Songs-DB_Custom2_album)
$unset(comment:Songs-DB_Custom3_album)
$unset(comment:Songs-DB_Custom4_album)

$noop(<!-- As workaround for ID3v2.3, store MOOD in TXXX:Mood, since we have no TMOO tag as in ID3v2.4 -->)
$if(%mood%,$set(~id3:TXXX:Mood,%mood%))

$noop(<!-- As workaround for ID3v2.3, store DISCSUBTITLE in TXXX:discsubtitle, since we have no TSST tag as in ID3v2.4 -->)
$if(%discsubtitle%,$set(~id3:TXXX:discsubtitle,%discsubtitle%))

$noop(<!-- Ambiguous album names: store MusicBrainz' _releasegroupcomment and use in file naming later on            -->)
$if(%_releasegroupcomment%,$set(releasegroupcomment,%_releasegroupcomment%))

$noop(<!-- Ambiguous track names: store MusicBrainz' _recordingcomment and use in file naming later on            -->)
$if(%_recordingcomment%,$set(recordingcomment,%_recordingcomment%))

File naming to go with it:

$if($and($eq(%compilation%,1),$or($eq(%albumartist%,),$eq(%musicbrainz_albumartistid%,89ad4ac3-39f7-470e-963a-56509c546377))),$if2(%artistsort%,%artist%)/$if2(%artistsort%,%artist%) - [compilations]/$if2(%artistsort%,%artist%) - %title%$if(%recordingcomment%, \(%recordingcomment%\)),$if2(%albumartistsort%,%albumartist%,%artistsort%,%artist%)/$if(%album%,$if2(%albumartistsort%,%albumartist%,%artistsort%,%artist%) - %album%$if(%releasegroupcomment%, \(%releasegroupcomment%\))$if(%date%%_primaryreleasetype%%_secondaryreleasetype%%releasecountry%, \()$if(%date%,$left(%date%,4))$if($and(%date%,%_primaryreleasetype%), )$if(%_primaryreleasetype%,%_primaryreleasetype%)$if($and(%date%%_primaryreleasetype%,%_secondaryreleasetype%),\, )$if(%_secondaryreleasetype%,%_secondaryreleasetype%)$if($and(%date%%_primaryreleasetype%%_secondaryreleasetype%,%releasecountry%),\, )$if(%releasecountry%,%releasecountry%)$if(%date%%_primaryreleasetype%%_secondaryreleasetype%%releasecountry%,\))/$if(%discsubtitle%,$if(%media%,%media% ,)$if(%discnumber%,%discnumber%: ,)%discsubtitle%/,),)$if2(%artistsort%,%artist%) - %title%$if(%recordingcomment%, \(%recordingcomment%\)))

I use fdemmer’s lastfmng plugin to get genres and some other stuff, so for completeness’ sake here is the plugin’s config.ini I use:


[global]
soundtrack_is_no_genre = True
ignore_feat_artists = False
; string used as fallback, when no tag value could be determined
default_unknown =
; this disables both album and track stats if set to False
print_tag_stats = True
print_tag_stats_album = True
print_tag_stats_track = False
; only enable collect_unused if you have sqlite (windows and macos may not)
collect_unused = False
lastfm_host = ws.audioscrobbler.com
lastfm_port = 443
; author's last.fm api key -- please use your own!
lastfm_key = REDACTED

[category-defaults]
; do/don't collect tags for that category
enabled = True
; a hard limit for how many tags are assigned to the metatag
limit = 5
; name of another category, unused tags in this category will be used in the given one.
overflow =
; add all tags from the other category to this one
prepend =
; used to join tags if >1 are to be used (None to use multtag)
separator =
; alphabetically sort tags before joining to string
sort = False
; percentage; only the tags with a score above x% of the most popular are used
threshold = 0.5
; apply titlecase() function to each tag
titlecase = True

[category-grouping]
# grouping is used as major/high level category
limit = 1
separator =
overflow = genre
metatag_track = grouping
metatag_album = albumgrouping

[category-genre]
limit = 5
threshold = 0.4
prepend = grouping
metatag_track = genre
metatag_album = albumgenre

[category-mood]
# eg. angry, cheerful, clam, ...
limit = 5
metatag_track = mood
metatag_album = albummood

[category-occasion]
# eg. background, late night, party
limit = 5
metatag_track = comment:Songs-DB_Occasion
metatag_album = comment:Songs-DB_Occasion_album

[category-category]
# i don't really know
limit = 5
metatag_track = comment:Songs-DB_Custom2
metatag_album = comment:Songs-DB_Custom2_album

[category-country]
# country names
limit = 2
threshold = 0.7
metatag_track = comment:Songs-DB_Custom4
metatag_album = comment:Songs-DB_Custom4_album

[category-city]
# city names
limit = 1
threshold = 0.7
metatag_track = comment:Songs-DB_Custom3
metatag_album = comment:Songs-DB_Custom3_album

[category-decade]
# musical era, eg. 80s, 90s, ...
limit = 1
threshold = 0.7
titlecase = False
metatag_track = comment:Songs-DB_Custom1
metatag_album = comment:Songs-DB_Custom1_album
regexp = ^([1-9][0-9])*[0-9]0s$

[category-year]
# the full year, eg. 1995, 2000, ...
# not recommended: let musicbrainz provide that
enabled = False
limit = 1
threshold = 0.7
titlecase = False
metatag_track = year
regexp = ^[1-9][0-9]{3}$


[searchlist]
;;; loosely based on the "standard" id3v1 genres
;;; #TODO i am not very happy with this. maybe the contemporary genres
;;;       list in wikipedia would be better as a basis for grouping.
grouping = Blues, Classic Rock, Country, Dance, Disco, Funk,
           Grunge, Hip-Hop, Jazz, Metal, New Age, Oldies, Pop,
           R&B, Rap, Reggae, Rock, Techno, Industrial, Alternative,
           Ska, Death Metal, Pranks, Soundtrack, Euro-Techno, Ambient,
           Trip-Hop, Vocal, Jazz+Funk, Fusion, Trance, Classical,
           Acid, House, Game, Sound Clip, Gospel, Noise,
           Alternative Rock, Bass, Soul, Punk, Space, Meditative,
           Instrumental Pop, Instrumental Rock, Ethnic, Gothic, Darkwave,
           Techno-Industrial, Electronic, Pop-Folk, Eurodance, Dream,
           Southern Rock, Comedy, Cult, Gangsta,
           Pop/Funk, Jungle, Native US, Cabaret, New Wave, Psychadelic,
           Rave, Showtunes, Trailer, Lo-Fi, Tribal, Acid Punk, Acid Jazz,
           Polka, Retro, Musical, Rock & Roll, Hard Rock, Folk,
           Folk-Rock, National Folk, Swing, Fast Fusion, Bebob, Latin,
           Revival, Celtic, Bluegrass, Avantgarde, Gothic Rock,
           Progressive Rock, Psychedelic Rock, Symphonic Rock, Slow Rock,
           Big Band, Chorus, Easy Listening, Acoustic, Humour, Speech,
           Chanson, Opera, Chamber Music, Sonata, Symphony, Booty Bass,
           Primus, Porn Groove, Satire, Slow Jam, Club, Tango, Samba,
           Folklore, Ballad, Power Ballad, Rhytmic Soul, Freestyle, Duet,
           Punk Rock, Drum Solo, Acapella, Euro-House, Dance Hall, Goa,
           Drum & Bass, Club-House, Hardcore, Terror, Indie,
           Polsk Punk, Beat, Heavy Metal,
           Black Metal, Crossover,
           Merengue, Salsa, Trash Metal, Anime, Synthpop

;;; genre should not also contain tags from grouping or you'll get duplicates!
genre = soundtrack, score, Instrumental, hair metal,
    2 tone, a cappella, abstract hip-hop, acid, acid jazz,
    acid rock, acid house, acoustic guitar, acoustic rock, adult alternative,
    adult contemporary, alternative country, alternative folk,
    alternative metal, alternative pop, alternative rock, anti-folk, aor, austropop, britpop,
    art rock, atmospheric, aussie hip-hop, avant-garde, ballads, baroque, beach,
    beats, bebop, big band, big beat, blaxploitation, blue-eyed soul, bluegrass, blues
    rock, boogie rock, boogie woogie, bossa nova, breakbeat, breaks, brit pop,
    brit rock, british invasion, broadway, bubblegum pop, cabaret, calypso, cha
    cha, choral, christian rock, classic country, classical guitar, club,
    college rock, composers, contemporary classical, contemporary country, contemporary folk, country
    folk, country pop, country rock, crossover, dance pop, dancehall, dark
    ambient, darkwave, delta blues, dirty south, disco, doo wop, doom metal,
    downtempo, dream pop, drum and bass, dub, dub reggae, dubstep, ebm, east coast
    rap, easy listening, edm, electric blues, electro, electro pop, elevator music,
    emo, emocore, ethnic, eurodance, europop, experimental, fingerstyle, folk
    jazz, folk pop, folk punk, folk rock, folksongs, free jazz, french rap,
    funk metal, funk rock, fusion, g-funk, gaelic, gangsta rap, garage,
    garage rock, glam rock, goa trance, gospel, gothic, gothic metal, gothic
    rock, gregorian, groove, guitar, happy hardcore, hard rock,
    hardcore, hardcore punk, hardcore rap, hardstyle, heavy metal, honky tonk,
    horror punk, house, humour, hymn, idm, indie folk, indie pop, indie rock,
    industrial, industrial metal, industrial rock, instrumental
    hip-hop, instrumental rock, j-rock, jangle pop, jazz fusion, jazz
    vocal, jungle, latin, latin jazz, latin pop, lounge, lovers rock, lullaby,
    madchester, mambo, medieval, melodic rock, minimal, minimalism, modern country, modern
    rock, mood music, motown, ndw, ndh, neo-soul, new age, new romantic, new wave, noise,
    northern soul, nu-metal, oi, old school rap, opera, orchestral, philly soul,
    piano, political reggae, polka, pop life, pop punk, pop rock, pop soul, post
    punk, post rock, power pop, progressive, psychedelic,
    psychedelic folk, psychedelic punk, psychedelic rock, psychobilly,
    psytrance, quiet storm, r&b, ragga, rap, rap metal, reggae pop,
    reggae rock, rnb, rock and roll, rock opera, rockabilly, rocksteady, roots, roots
    reggae, rumba, salsa, samba, schlager, screamo, shanty, shock rock, ska punk,
    smooth jazz, soft rock, southern rock, space rock, speech, spoken word, standards,
    stoner rock, surf rock, swamp rock, swing, symphonic metal, symphonic rock,
    synth pop, synthpop, tango, techno, teen pop, thrash metal, traditional country,
    traditional folk, tribal, turntablism, underground, underground
    hip-hop, underground rap, urban, vocal trance, waltz, west coast rap,
    western swing, world, world fusion, power metal, alternative punk,
    post punk, folktronica, glam, folk metal, viking metal, progressive metal,
    downbeat, groovesalad, post grunge, christian, classic metal, melodic metal,
    j-pop, j-rock, neoclassical, composer, symphonic, speed metal, post metal

mood = angry, bewildered, bouncy, calm, cheerful, chill, cold,
       complacent, crazy, crushed, cynical, dark, dramatic, dreamy, drunk,
       eclectic, emotional, energetic, envious, feel good, flirty, funky, groovy,
       happy, haunting, healing, high, hopeful, hot, humorous, inspiring, intense,
       irritated, laidback, lonely, lovesongs, meditation, melancholic, melancholy,
       mellow, moody, morose, passionate, peace, peaceful, playful, pleased,
       positive, quirky, reflective, rejected, relaxed, retro, sad, sentimental,
       sexy, silly, smooth, soulful, spiritual, suicidal, surprised, sympathetic,
       trippy, upbeat, uplifting, weird, wild, yearning, catchy, nostalgic,
       heartbreaking, lovely, depressive, cool, slow, sweet, soft, fun, heavy,
       cheap, fast

occasion = background, birthday, breakup, carnival, chillout,
           christmas, death, dinner, drinking, driving, graduation, halloween, hanging
           out, heartache, holiday, late night, love, new year, party, protest, rain,
           rave, romantic, sleep, spring, summer, sunny, twilight, valentine, wake up,
           wedding, winter, work, xmas

category = animal songs, amazing, awesome, attitude, autumn, b-side, ballad,
           banjo, bass, beautiful, body parts, bootlegs, brass, cafe del mar, chamber
           music, clarinet, classic, classic tunes, compilations, covers, cowbell,
           deceased, demos, divas, dj, drugs, drums, duets, field recordings, female,
           female vocalist, film score, flute, food, genius, girl group, great lyrics,
           guitar solo, guitarist, handclaps, harmonica, historical, horns, hypnotic,
           influential, insane, jam, keyboard, legends, life, linedance, live, loved,
           lyricism, male, male vocalist, masterpiece, melodic, memories, musicals,
           nostalgia, novelty, number songs, old school, oldie, oldies, one hit
           wonders, orchestra, organ, parody, poetry, political, promos, radio
           programs, rastafarian, remix, samples, satire, saxophone, showtunes,
           sing-alongs, singer-songwriter, slide guitar, solo instrumentals,
           speech, stories, strings, stylish, synth, top 40, traditional,
           trumpet, unique, unplugged, violin, virtuoso, vocalization, vocals,
           cover, epic, best of

;;; #TODO translate countries. eg. icelandic -> iceland
country = african, american, arabic, australian, austrian,
          belgian, brazilian, british, canadian, caribbean, celtic, chinese, cuban,
          danish, dutch, eastern europe, egyptian, estonian, european, finnish,
          french, german, greek, hawaiian, ibiza, icelandic, indian, iranian, irish,
          island, israeli, italian, jamaican, japanese, korean, mexican, middle
          eastern, new zealand, norwegian, oriental, polish, portuguese, russian,
          scandinavian, scottish, southern, spanish, swedish, swiss, thai, third
          world, turkish, welsh, western, texas, uk, belgium, england, scotland,
          usa, suomi, germany, austria, finland, icelandic

city = acapulco, adelaide, amsterdam, athens, atlanta,
       atlantic city, auckland, austin, bakersfield, bali, baltimore, bangalore,
       bangkok, barcelona, barrie, beijing, belfast, berlin, birmingham, bogota,
       bombay, boston, brasilia, brisbane, bristol, brooklyn, brussels, bucharest,
       budapest, buenos aires, buffalo, calcutta, calgary, california, cancun,
       caracas, charlotte, chicago, cincinnati, cleveland, copenhagen, dallas,
       delhi, denver, detroit, dublin, east coast, edmonton, frankfurt, geneva,
       glasgow, grand rapids, guadalajara, halifax, hamburg, hamilton, helsinki,
       hong kong, houston, illinois, indianapolis, istanbul, jacksonville, kansas
       city, kiev, las vegas, leeds, lisbon, liverpool, london, los angeles,
       louisville, madrid, manchester, manila, marseille, mazatlan, melbourne,
       memphis, mexico city, miami, michigan, milan, minneapolis, minnesota,
       mississippi, monterrey, montreal, munich, myrtle beach, nashville, new
       jersey, new orleans, new york, new york city, niagara falls, omaha, orlando,
       oslo, ottawa, palm springs, paris, pennsylvania, perth, philadelphia,
       phoenix, phuket, pittsburgh, portland, puebla, raleigh, reno, richmond, rio
       de janeiro, rome, sacramento, salt lake city, san antonio, san diego, san
       francisco, san jose, santiago, sao paulo, seattle, seoul, shanghai,
       sheffield, spokane, stockholm, sydney, taipei, tampa, tijuana, tokyo,
       toledo, toronto, tucson, tulsa, vancouver, victoria, vienna, warsaw,
       wellington, westcoast, windsor, winnipeg, zurich

; add words (in uppercase!) that should be kept uppercase by titlecase
abbreviations = USA, UK, EBM, EDM, IDM, NDW, NDH, R&B, AOR


[translations]
; <name1> is translated into <name2>
acoustic guitar = guitar
ambient piano = piano
brit pop = britpop
chill out = chillout
depressed = depressive
deutsch = german
dnb = drum and bass
drum 'n' bass = drum and bass
drum n bass = drum and bass
electronica = electronic
english = england
female vocalists = female vocalist
hip hop = hip-hop
hiphop = hip-hop
jpop = j-pop
jrock = j-rock
male vocalists = male vocalist
melancholic = melancholy
nu metal = nu-metal
post-grunge = post grunge
post-metal = post metal
post-punk = post punk
post-rock = post rock
prog rock = progressive rock
relax = relaxed
relaxing = relaxed
rock 'n' roll = rock & roll
rock and roll = rock & roll
rock n roll = rock & roll
rock'n'roll = rock & roll
rnb = r&b
sex = sexy
trip hop = trip-hop
minimalist = minimalism
modern classical = contemporary classical
soundtracks = soundtrack
speeches = speech
00s = 2000s
10s = 2010s
20s = 1920s
30s = 1930s
40s = 1940s
50s = 1950s
60s = 1960s
70s = 1970s
80s = 1980s
90s = 1990s

It will sort each and everything under the (album) artist sort names. Titles picked up from compilation samplers are stored in a special subfolder albumartistsort - [compilations]. The script uses release group comments to differentiate between albums of the same name (Peter Gabriel, Weezer, Elis, …), adds a release year, album type and release country in parentheses and disambiguates tracks of the same name by their recording comments (adding things like (live, 1990-03_ Billboard The Venue, Melbourne, Australia) to the track filename to avoid things like title (1).flac, title (2).flac.


(Disregard the sole [compilations] folder, that was accidentally generated with an older script version.)

The year shown in the album folder name is the release year, the country the release country, so I can distinguish releases with the same name.

Oh, and there are no track numbers because I’m interested in the title and not their storage location on a particular medium. There is also some intended redundancy (repeated artist names) because the album and track artists can be different.

This structure makes me happy when travelling: It’s much easier copying stuff together onto a USB drive or SD card and still know which title is which. I was so fed up with USB sticks containing a hundred entries starting with 01. … and no artist name

6 Likes

I’ve updated the MBP YA Magic-Script that does more stuff too to v1.9.

If there are no values within the brackets, they will not show at all. (So, no more [ ] [ ] empties)
Re-organized the Settings section.
Cleared up the examples and documentation a bit.
…and put in some “Earlier in the Sort…” options for re-directing stuff while organizing.
To use those on and off, you’d have to go into the Options and change the values as needed when saving various sets of files.

3 Likes

@tdiaz Great Update, big Improvements!

…and It’s 2.0 now, it does what I want, it’s been taken apart function by function.

Gone through, line by line and the CBR/VBR section has been fixed up a lot.

I had some squirrelly voodoo going on with the File Metrics being created. It was probably a combination of things script wise and pre-processed file wise.

With “Ignore Tags” set, to where I’m just over-riding the two I use within the script for special album placement, it’s all good!

I had some cross-use of %_underScore% vs %noUnderScore% so some tags were getting created and then that was having an affect on anything that already had and MBID …and the unintended tags.

Sorry for clogging up the thread … :slight_smile:

Now I’ll go mess with the Python for a bit … and see what I come up with.

2 Likes

I just wanted to share that I updated my script to v2.0 if interested check it out. And once again thanks the all the people who help me out within this board, it’s like school for me I just keep on learning from the great teachers who dwell here!

1 Like

EDIT: I found a serious misplaced parenthesis error in my script. It was causing soundtracks to become completely messed up. I’ve replaced it below with my corrected version.

I rewrote my script to make it a little more compact. I used to have a lot of repeated code, but now I pulled the common code out of the $if statements and consolidated it.

I also added a feature I just discovered to clean up my folder names. I added some scripts to set control variables and then my naming script adds some disambiguating elements to file names only where necessary.

I have a couple versions of the same release, and I was using release comments to keep them in separate folders. The unfortunate side effect of this was presence of release comments on releases where I didn’t need them. Now I can designate only certain releases to add the release comment to the folder name, while all the rest are unaffected. Since variables are written to the files as tags, I only have to designate the release once, and it will always use the alternate naming script.

In this test, you can see the AKB48 single has it’s release comments (Type-A, Type-B) in the folder name, while the Rush album doesn’t. Kate Bush’s Cloudbusting single now has it’s media type in the folder name, but none of the other albums do.

In the Scripting tag, I added the following lines, each in it’s own script:

$set(usereleasecomment,1)
$set(usemediatype,1)
$delete(usereleasecomment)
$delete(usemediatype)

I also have a common script that’s set to run automatically.

$if($gt(%_totalalbumtracks%,99),$set(tracknumber,$num(%tracknumber%,3)),$set(tracknumber,$num(%tracknumber%,2)))

My full naming script is:

$replace(
$replace(
$replace(
$replace(
$replace(
$replace(
$if($in(%releasetype%,soundtrack),
	$noop(Soundtracks)
	Soundtrack/~
	$left($swapprefix(%album%,A,An,The),1)~/$swapprefix(%album%,A,An,The),
		$if(%compilation%,
		$noop(Various artist albums)
		Various Artists/~
		$left($swapprefix(%album%,A,An,The),1)~/$swapprefix(%album%,A,An,The),
		$noop(Normal albums)
		~$left($if2(%albumartistsort%,%artistsort%,%albumartist%,%artist%),1)~/
		$if2(%albumartistsort%,%artistsort%,%albumartist%,%artist%)/%album%))
	$noop(Common path)
	$if(%usereleasecomment%,$if(%_releasecomment%, \(%_releasecomment%\)))
	$if(%usemediatype%,$if(%media%, \(%media%\)))
	$if($in(%releasetype%,single), \(Single\))
	$if($in(%releasetype%,ep), \(EP\))/
	$if($gt(%totaldiscs%,1),%discnumber%)
	$if($gt(%_totalalbumtracks%,99),$num(%tracknumber%,3),$num(%tracknumber%,2)) - %artist% - %title%
,*,[x])
,?,)
,:,-)
,",')
,<,{)
,>,})
4 Likes

I was playing around a little just to satisfy myself as to what would really work for me as a script. Came up with this in two days may have a bug here and there but I thought maybe it would help someone out who doesn’t understand the tagger-script language and needed a pretty cool script. This script goes about 3 layers deep but it has lots of info for each album. Like I said there is a chance it may have a few errors but overall not too bad, feel free to play with it if you like.

$if($inmulti(%releasetype%,soundtrack),Soundtrack,$swapprefix($if2(%_artists_album_primary_std%,%artist%),The,Die,Le))
/$if2(%originalyear%,$left(%originaldate%,4),$left(%date%,4),0000) - %album%
$if($eq(%releasestatus%,promotion), [Promo],)
$if($eq(%releasestatus%,bootleg), [Bootleg],)
$if($eq(%releasetype%,album), [Album],
$if($eq(%releasetype%,single), [Single],
$if($eq(%releasetype%,ep), [EP],
$if($eq(%releasetype%,broadcast), [FM],
$if($eq(%releasetype%,other), [Other],
$if($inmulti(%releasetype%,dj-mix), [DJ Mix],
$if($inmulti(%releasetype%,remix), [Remix],
$if($inmulti(%releasetype%,soundtrack), [OST],
$if($inmulti(%releasetype%,live), [Live],
$if($inmulti(%releasetype%,mixtape/street), [Mixtape],
$if($inmulti(%releasetype%,compilation), [Compilation],)))))))))))
/$if(%date%,[$left(%date%,4)] ,----)
$if(%media%,[$title(%media%)] ,)
$if($gt(%totaldiscs%,1),[%totaldiscs%CD] ,)
$if(%label%,$title([%label%])
$if(%catalognumber%,$title([%catalognumber%]))
$if(%releasecountry%, [%releasecountry%]))
/$upper(%_extension%)
$if($gt(%_bits_per_sample%,16), [%_bits_per_sample%bit $div(%_sample_rate%,1000)kHz])
/$if($gt(%totaldiscs%,1),CD$num(%discnumber%,2)$if(%discsubtitle%, - %discsubtitle%,))
/$if($in(%media%,Vinyl),%_musicbrainz_tracknumber%,$num(%tracknumber%,2)). $if(%_multiartist%,%artist% - ,)$truncate(%title%,70)

Results:
masterpiece

1 Like

A post was split to a new topic: Help with finding or making tagger script to handle (feat. …)

Here is my final version:

$swapprefix($if2(%_artists_album_primary_std%,%artist%),The,Die,Le)
/$replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($swapprefix($if2(%albumartist%,%artist%),The,Die,Le),",''), meets , & ), X , & ), × , & ),; , & ), x , & ), | , & ), • , & ), ⋅ , & ), and , & ),+,&), with , & ), _ , & ), vs , & ), vs. , & ) - $replace($replace($truncate(%album%,100),",''),:,-)
$if($gt(%totaldiscs%,1), %totaldiscs%CD)
$if($in(%media%,Vinyl), [Vinyl],)
$if($in(%media%,Cassette), [Cassette],)
$if($eq(%releasestatus%,promotion), [Promo],)
$if($eq(%releasestatus%,bootleg), [Bootleg],)
$if($ne_all(%catalognumber%,none,[none]),$if(%catalognumber%, $upper([$replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($rsearch(%catalognumber%,\(.+?\)\(?:; |\$\)+),_,),⋅,),/,),:,),*,),?,),",),<,),>,),|,), ,)])))
$if(%date%, [%date%],)
$if($eq(%releasetype%,album), [Album],
$if($eq(%releasetype%,single), [Single],
$if($eq(%releasetype%,ep), [EP],
$if($eq(%releasetype%,broadcast), [FM],
$if($eq(%releasetype%,other), [Other],
$if($inmulti(%releasetype%,dj-mix), [DJ Mix],
$if($inmulti(%releasetype%,remix), [Remix],
$if($inmulti(%releasetype%,soundtrack), [OST],
$if($inmulti(%releasetype%,live), [Live],
$if($inmulti(%releasetype%,mixtape/street), [Mixtape],
$if($inmulti(%releasetype%,compilation), [Compilation],)))))))))))
$if($ne(%_extension%,mp3), $upper(%_extension%))
$if($gt(%_bits_per_sample%,16), %_bits_per_sample%bit $div(%_sample_rate%,1000)kHz)
/$if($gt(%totaldiscs%,1),CD$num(%discnumber%,2)$if(%discsubtitle%, - %discsubtitle%,))
/$if($in(%media%,Vinyl),%_musicbrainz_tracknumber%,$num(%tracknumber%,2)). $if($and(%_multiartist%,$or(%compilation%,%_artists_album_additional_id%)),%artist% - ,)$truncate(%title%,70)

Last edit: HERE
Full info: HERE

Result:

2 Likes

I Just made an alternate script I like to borrow ideas and see what I can come up with. It has similarities to my other script but it puts albums into folder categories like Studio albums, Live albums, singles, etc…
of course, as usual, there may be an issue somewhere or there but overall it’s working pretty good!

The Script:

$if($gt(%_bits_per_sample%,16),-=[%_bits_per_sample%bit]=-,)/
$upper(%_extension%)/
$if2($if($eq($len(%musicbrainz_albumid%),0),No MBID/$if2(%albumartist%,%artist%),)/
$if($and($lt($matchedtracks(),%totaltracks%),$lt($matchedtracks(),60)),Incomplete Releases/$if2(%albumartist%,%artist%),$if2(Artists/$if2(%albumartist%,%artist%)))/
$if($eq(%releasetype%,album; soundtrack),Soundtracks/,)
$if($eq(%releasestatus%,promotion),Promo's/,)
$if($eq(%releasestatus%,bootleg),Bootlegs/,)
$if($eq(%releasetype%,album),Studio Albums/,
$if($eq(%releasetype%,single),Singles/,
$if($eq(%releasetype%,ep),EP's/,
$if($inmulti(%releasetype%,soundtrack),OST/,
$if($inmulti(%releasetype%,live),LIVE/,
$if($inmulti(%releasetype%,compilation),Compilations/,
$if($eq(%releasetype%,album; soundtrack),Soundtracks/,))))))))
$replace($replace($rreplace($if($not($inmulti(%releasetype%,soundtrack)),$if($eq(%albumartist%,Various Artists),VA,%albumartist%)-)%album%,[_:*?"<>|], -),?,), ,_)
$if($eq(%releasestatus%,promotion),-PROMO,)
$if($eq(%releasestatus%,bootleg),-BOOTLEG,)
$if($ne_all(%catalognumber%,none,[none]),$if(%catalognumber%,$upper(-\($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($rsearch(%catalognumber%,\(.+?\)\(?:; |\$\)+),_,),⋅,),/,),:,),*,),?,),",),<,),>,),|,), ,)\))))
$if($eq(%releasetype%,single),-\(CDMaxi\)-SINGLE,
$if($eq(%releasetype%,ep),-EP,
$if($eq(%releasetype%,broadcast),-FM,
$if($eq(%releasetype%,other),-OTHER,
$if($inmulti(%releasetype%,dj-mix),-DJ MIX,
$if($inmulti(%releasetype%,remix),-REMIX,
$if($inmulti(%releasetype%,soundtrack),-OST,
$if($inmulti(%releasetype%,live),-LIVE,
$if($inmulti(%releasetype%,mixtape/street),-MIXTAPE,)))))))))
$if($gt(%_bits_per_sample%,16),-[%_bits_per_sample%bit,)
$if($gt(%_sample_rate%,48000), $div(%_sample_rate%,1000)kHz],)
$if($in(%media%,Vinyl),-VINYL,)
$if($in(%media%,Cassette),-CASSETTE,)
$if($eq(%media%,Hybrid SACD),-[Hybrid-SACD],)
$if($eq(%media%,SACD),-[SACD],)
$if($eq(%media%,SHM-CD),-[SHM-CD],)
$if($eq(%media%,SHM-SACD),-[SHM-SACD],)
$if($eq(%media%,Digital Media),-WEB,)
$if($eq(%media%,Blu-spec CD),-[BLU-SPEC],)
$if($in(%media%,CD),$if($gt(%totaldiscs%,1),-%totaldiscs%CD,-CD),)
$if($in(%media%,Vinyl),$if($gt(%totaldiscs%,1),-%totaldiscs%LP,),)
$if($in(%media%,Digital Media),$if($gt(%totaldiscs%,1),-%totaldiscs%CD,),)
$if($ne(%_extension%,mp3),$upper(-%_extension%))
$if($if2(%date%,%originalyear%,%originaldate%),-$left($if2(%date%,%originalyear%,%originaldate%),4), [0000])-PiCARD
/$if($in(%media%,Vinyl),$if($gt(%totaldiscs%,1),LP$num(%discnumber%,2)$if(%discsubtitle%, - %discsubtitle%,)))
$if($in(%media%,CD),$if($gt(%totaldiscs%,1),CD$num(%discnumber%,2)$if(%discsubtitle%, - %discsubtitle%,)))
$if($in(%media%,Digital Media),$if($gt(%totaldiscs%,1),CD$num(%discnumber%,2)$if(%discsubtitle%, - %discsubtitle%,)))
/$if($in(%media%,Vinyl),%_musicbrainz_tracknumber%,$if($gt(%totaldiscs%,1),%discnumber%,)$num(%tracknumber%,2)). $if($and(%_multiartist%,$not($inmulti(%releasetype%,soundtrack))),%artist% - ,)$truncate(%title%,70)

Results:
result

If you like this script give me some likes, please. If there are issues feel free to correct them and let others know. I spend way too much time playing with tagger script and you would think I would be a little better with it by now. Anyway, maybe it will help somebody out there!

1 Like

Fine Tuning and a little house cleanup v2.1

1st you will need 3 scripting files
1: 4 Digit Date: $set(date,$left(%date%,4))
2: Release Comment: $set(album,$if(%_releasecomment%,%album% ($title(%_releasecomment%)),%album%))
3: Remove feat from album title: $set(album,$rreplace(%album%,\s(feat. [^)]+),))

$if($gt(%_bits_per_sample%,16),-=[%_bits_per_sample%bit]=-,)/
$upper(%_extension%)/
$if2($if($eq($len(%musicbrainz_albumid%),0),No MBID/$if2(%albumartist%,%artist%),)
,$if($eq(%releasetype%,album; soundtrack),Soundtracks/,)
,$if($and($or($eq(%releasetype%,album; compilation),$or($eq(%releasetype%,album),$eq(%releasetype%,compilation))),$eq(%albumartist%,Various Artists)),Compilations/,)
,$if($in(%album%,Promo Only),Promo Only/,)
$set(_albumartistprefix,$rsearch(%albumartist%,^\(The|A\)\\s+))
,$if($and($lt($matchedtracks(),%totaltracks%),$lt($matchedtracks(),60)),Incomplete Releases/$if2(%albumartist%,%artist%),$if(%_albumartistprefix%,$rreplace(%albumartist%,^\(%_albumartistprefix%\)\(.*\),\\2 \(\\1\)),%albumartist%)))/
$replace($replace($rreplace($if($not($inmulti(%releasetype%,soundtrack)),$if($eq(%albumartist%,Various Artists),VA,%albumartist%)-)%album%,[_:*?"<>|], -),?,), ,_)
$if($eq(%releasestatus%,promotion),-PROMO,)
$if($eq(%releasestatus%,bootleg),-BOOTLEG,)
$if($ne_all(%catalognumber%,none,[none]),$if(%catalognumber%,$upper(-\($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($rsearch(%catalognumber%,\(.+?\)\(?:; |\$\)+),_,),⋅,),/,),:,),*,),?,),",),<,),>,),|,), ,)\))))
$if($eq(%releasetype%,single),-\(CDMaxi\)-SINGLE,
$if($eq(%releasetype%,ep),-EP,
$if($eq(%releasetype%,broadcast),-FM,
$if($eq(%releasetype%,other),-OTHER,
$if($inmulti(%releasetype%,dj-mix),-DJ MIX,
$if($inmulti(%releasetype%,remix),-REMIX,
$if($inmulti(%releasetype%,soundtrack),-OST,
$if($inmulti(%releasetype%,live),-LIVE,
$if($inmulti(%releasetype%,mixtape/street),-MIXTAPE,)))))))))
$if($gt(%_bits_per_sample%,16),-[%_bits_per_sample%bit,)
$if($gt(%_sample_rate%,48000),-$div(%_sample_rate%,1000)kHz],)
$if($in(%media%,Vinyl),-VINYL,)
$if($in(%media%,Cassette),-CASSETTE,)
$if($eq(%media%,Hybrid SACD),-[Hybrid-SACD],)
$if($eq(%media%,SACD),-[PS3-SACD],)
$if($eq(%media%,DVD-Audio),-[DVD-A],)
$if($eq(%media%,SHM-CD),-[SHM-CD],)
$if($eq(%media%,SHM-SACD),-[SHM-SACD],)
$if($eq(%media%,Digital Media),-WEB,)
$if($eq(%media%,Blu-spec CD),-[BLU-SPEC],)
$if($in(%media%,CD),$if($gt(%totaldiscs%,1),-%totaldiscs%CD,-CD),)
$if($in(%media%,Vinyl),$if($gt(%totaldiscs%,1),-%totaldiscs%LP,),)
$if($in(%media%,Digital Media),$if($gt(%totaldiscs%,1),-%totaldiscs%CD,),)
$if($ne(%_extension%,mp3),$upper(-%_extension%))
$if($if2(%date%,%originalyear%,%originaldate%),-$left($if2(%date%,%originalyear%,%originaldate%),4), [0000])-PiCARD
/$if($in(%media%,Vinyl),$if($gt(%totaldiscs%,1),LP$num(%discnumber%,2)$if(%discsubtitle%, - %discsubtitle%,)))
$if($in(%media%,CD),$if($gt(%totaldiscs%,1),CD$num(%discnumber%,2)$if(%discsubtitle%, - %discsubtitle%,)))
$if($in(%media%,Digital Media),$if($gt(%totaldiscs%,1),CD$num(%discnumber%,2)$if(%discsubtitle%, - %discsubtitle%,)))
/$if($in(%media%,Vinyl),%_musicbrainz_tracknumber%,$if($gt(%totaldiscs%,1),%discnumber%,)$num(%tracknumber%,2)). $if($and(%_multiartist%,$not($inmulti(%releasetype%,soundtrack))),%artist% - ,)$truncate(%title%,70)

Results:
Annotation 2020-01-17 214818

2 Likes

tdiaz thanks so much for your time and sharing your script. It is doing basically exactly what I have been looking for. I made a small tweak to the file naming to get [Year] ahead of the album name but other than this code is the bees knees.

Out of curiosity, are you revisiting or planning to expand code section re:bit rates for files in excess of 320? I’d love to add in higher bit rates for lossless audio but not sure where to start.

Thanks again!