Help to modify a script!


#1

Can someone help modify this code so that it does not add ‘media type’ to the folder name?

$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★ MBP Magic-Script - v0.4.2                                            ★)
$noop(★                                                                      ★)
$noop(★ Here is a script for music renaming in MusicBrainz Picard            ★)
$noop(★                                                                      ★)
$noop(★ Features :                                                           ★)
$noop(★ - Organize root music folder with last.fm category OR artist initial ★)
$noop(★ - Can use custom subfolder for each main type [Album/Single/EP...]   ★)
$noop(★ - Can use custom subfolder for compilation [!various]                ★)
$noop(★ - Exclude type album from using subfolder                            ★)
$noop(★ - Custom folder for soundtrack/various                               ★)
$noop(★ - Alphabetize artist without leading "The"                           ★)
$noop(★ - Improve tag displaying on some device                              ★)
$noop(★ - Filtered character for files & folders naming                      ★)
$noop(★ - Include media type in folder name [when it's not CD]               ★)
$noop(★ - Subfolder for multi-disc [setting to disable subfolder]            ★)
$noop(★ - Custom folder tag for multi-disc CD/Vinyl [CD1/Disc1 by default]   ★)
$noop(★ - Put multi-CD release in same folder [naming become 101/102/201...] ★)
$noop(★ - Vinyl can use musicbrainz style for track [A1/A2/B1...]            ★)
$noop(★ - Custom settings                                                    ★)
$noop(★                                                                      ★)
$noop(★ Needed :                                                             ★)
$noop(★ - Last.fm.ng plugin [for category trending]                          ★)
$noop(★   -> https://github.com/fdemmer/Picard-Last.fm.ng-Plugin             ★)
$noop(★                                                                      ★)
$noop(★ Happy tagging!!!                                                     ★)
$noop(★                                                                      ★)
$noop(★----------------------------------------------------------------------★)
$noop(★                           ★ By Ski-lleR ★                            ★)
$noop(★----------------------------------------------------------------------★)
$noop(★                                                                      ★)
$noop(★ Thanks to                                                            ★)
$noop(★                                                                      ★)
$noop(★ avibrazil for his filter                                             ★)
$noop(★ > https://github.com/avibrazil/picard-scripting                      ★)
$noop(★                                                                      ★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)

$noop(######################### SETTINGS #########################)

$noop(★ GLOBAL ★)
$set(_separateByTypeInArtistFolder,1)
$set(_separateAlbum,0)
$set(_useMusicBrainzStyleForVinylTrack,0)

$noop(★ Multi-Disc ★)
$set(_useSubDiscFolder,1)
$set(_mergeDiscWhenNotUsingSubfolder,0)
$set(_showDiscSubtitle,1)
$set(_nameForTypeCD,CD)
$set(_nameForTypeVinyl,Disc)

$noop(★ orderTypeForRoot ★)
$noop(★  1: Category [Last.fm.ng] ★)
$noop(★  2: Artist first letter ★)
$set(_orderTypeForRoot,1)

$noop(★ orderTypeForArtist ★)
$noop(★  1: First letter of first name ★)
$noop(★  2: First letter of last name ★)
$set(_orderTypeForArtist,1)

$noop(★ CUSTOM SUBFOLDER BY TYPE ★)
$set(_albumSubFolder,Albums/)
$set(_liveSubFolder,Lives/)
$set(_singlesSubFolder,Singles/)
$set(_epSubFolder,EP/)
$set(_broadcastSubFolder,Broadcast/)
$set(_otherSubFolder,Others/)

$noop(★ COMPILATION FOLDER [NO VARIOUS] ★)
$set(_compilationsSubFolder,Compilations/)

$noop(★ SOUNDTRACK/VARIOUS FOLDER ★)
$set(_soundTracksFolder,SoundTracks/)
$set(_variousArtistsFolder,Various/)

$noop(####################### END SETTINGS #######################)


$noop(########## PATH SAMPLE [with defaults settings] ############)

$noop(★ 1st level ★)
$noop(~/Music/SoundTracks)
$noop(~/Music/Various)
$noop(~/Music/Category)

$noop(★ 2nd level ★)
$noop(~/Music/SoundTracks/Album name - 2016 [Vinyl])
$noop(~/Music/Various/Album name - 2016 [Vinyl])
$noop(~/Music/Category/Artist, The)

$noop(★ 3rd level ★)
$noop(~/Music/SoundTracks/Album name - 2016 [Vinyl]/CD1~subtitle)
$noop(~/Music/Various/Album name - 2016 [Vinyl]/CD1~subtitle)
$noop(~/Music/Category/Artist, The/Compilations)
$noop(~/Music/Category/Artist, The/Singles)
$noop(~/Music/Category/Artist, The/EP)
$noop(~/Music/Category/Artist, The/Album name - 2016 [Vinyl])

$noop(★ 4th level ★)
$noop(~/Music/SoundTracks/Album name - 2016 [Vinyl]/CD1~subtitle/01. Track.flac)
$noop(~/Music/Various/Album name - 2016 [Vinyl]/CD1~subtitle/01. Track.flac)
$noop(~/Music/Category/Artist, The/Compilations/Album name - 2016 [Vinyl])
$noop(~/Music/Category/Artist, The/Singles/Album name - 2016 [Vinyl])
$noop(~/Music/Category/Artist, The/EP/Album name - 2016 [Vinyl])
$noop(~/Music/Category/Artist, The/Album name - 2016 [Vinyl]/CD1~subtitle)

$noop(★ 5eme level ★)
$noop(~/Music/Category/Artist, The/Compilations/Album name - 2016 [Vinyl]/CD1~subtitle)
$noop(~/Music/Category/Artist, The/Singles/Album name - 2016 [Vinyl]/CD1~subtitle)
$noop(~/Music/Category/Artist, The/EP/Album name - 2016 [Vinyl]/CD1~subtitle)
$noop(~/Music/Category/Artist, The/Album name - 2016 [Vinyl]/CD1~subtitle/01. Track.flac)

$noop(★ 6eme level ★)
$noop(~/Music/Category/Artist, The/Compilations/Album name - 2016 [Vinyl]/CD1~subtitle/01. Track.flac)
$noop(~/Music/Category/Artist, The/Singles/Album name - 2016 [Vinyl]/CD1~subtitle/01. Track.flac)
$noop(~/Music/Category/Artist, The/EP/Album name - 2016 [Vinyl]/CD1~subtitle/01. Track.flac)


$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 EP ★)
$if($in(%releasetype%,ep),
  $set(_isEP,1)
)

$noop(★ Detect Broadcast ★)
$if($in(%releasetype%,broadcast),
  $set(_isBroadcast,1)
)

$noop(★ Detect Other ★)
$if($in(%releasetype%,other),
  $set(_isOther,1)
)

$noop(★ Detect Artist Compilation ★)
$if($in(%releasetype%,compilation),
  $set(_isArtistCompil,1)
)

$noop(★ Detect Live ★)
$if($in(%releasetype%,live),
  $set(_isLive,1)
)

$noop(★ Detect Soundtrack ★)
$if($in(%releasetype%,soundtrack),
  $set(_isSoundTrack,1)
)

$noop(★ Detect Various Artist ★)
$if($eq(%albumartist%,Various Artists),
  $set(_isVarious,1)
)

$noop(★ Re-detect Compilation ★)
$if($eq(%compilation%,1),
  $set(_isGlobalCompil,1)
)


$noop(########## TAG MANAGE ######################################)

$noop(★ Organize artist by alphabetical folders excluding leading The ★)
$set(albumartist,$if($eq($left(%albumartist%,4),The ),%albumartistsort%,%albumartist%))


$noop(########## TAG CLEANUP  ####################################)

$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(album,$rreplace(%album%,\(\\d\)",\\1″))
$set(discsubtitle,$rreplace(%discsubtitle%,\(\\d\)",\\1″))

$noop(★ "something" ➡ “something”)
$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(★ 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(★ : ➡ ∶)
$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(########## RENAMER CORE ####################################)

$noop(★ Soundtrack in custom directory ★)
$if(%_isSoundTrack%,%_soundTracksFolder%,

  $noop(★ Various in custom directory ★)
  $if(%_isVarious%,%_variousArtistsFolder%,

    $noop(★ Order root by category ★)
    $if($eq(%_orderTypeForRoot%,1),
      $if2(%albumgrouping%,Unknown)
    )/

    $noop(★ Order root by artist ★)
    $if($eq(%_orderTypeForRoot%,2),
      $if($eq(%_orderTypeForArtist%,1),
        $upper($firstalphachar($if2(%_albumartistForFilename%, %_artistForFilename%),#)),
      $if($eq(%_orderTypeForArtist%,2),
        $upper($firstalphachar($if2(%_albumartistsortForFilename%, %_artistsortForFilename%),#))
      ))
    )/

    $noop(★ Artist with first letter of first name ★)
    $if($eq(%_orderTypeForArtist%,1),
      $if2(%_albumartistForFilename%,%_artistForFilename%)
    )/

    $noop(★ Artist with first letter of last name ★)
    $if($eq(%_orderTypeForArtist%,2),
      $if2(%_albumartistsortForFilename%,%_artistsortForFilename%)
    )/

    $noop(★ Organize by type ★)
    $if($eq(%_separateByTypeInArtistFolder%,1),
      $if($or(%_isArtistCompil%,%_isGlobalCompil%),%_compilationsSubFolder%,
        $if($eq(%_isLive%,1),%_liveSubFolder%,
          $if($eq(%_isAlbum%,1),
            $if($eq(%_separateAlbum%,1),%_albumSubFolder%)
          )
          $if($eq(%_isSingle%,1),%_singlesSubFolder%)
          $if($eq(%_isEP%,1),%_epSubFolder%)
          $if($eq(%_isBroadcast%,1),%_broadcastSubFolder%)
          $if($eq(%_isOther%,1),%_otherSubFolder%)
        )
      )
    )
  )
)

$noop(★ Album - YEAR [Media-Type][CDx~subtitle]/ or /CDx~subtitle/ ★)
%_albumForFilename% - 

$if($if2(%date%,%originalyear%,%originaldate%),$left($if2(%date%,%originalyear%,%originaldate%),4),0000)
$if($ne(%media%,CD), $if(%media%,[%media%]))

$if($gt(%totaldiscs%,1),$noop(
  )$if($lt(%totaldiscs%,10),$set(_discnumber,%discnumber%),$set(_discnumber,$num(%discnumber%,2)))$noop(
  )$if($in(%media%,Vinyl),$noop(
    )$set(_nameForDiscFolder,@OSLASH@@OBRACKET@%_nameForTypeVinyl%%_discnumber%@CBRACKET@),$noop(
    )$set(_nameForDiscFolder,@OSLASH@@OBRACKET@%_nameForTypeCD%%_discnumber%@CBRACKET@))$noop(
    )$if($and(%_discsubtitleForFilename%,$eq(%_showDiscSubtitle%,1)),$set(_nameForDiscFolder,%_nameForDiscFolder%~%_discsubtitleForFilename%))$noop(
    )$if($eq(%_useSubDiscFolder%,1),$noop(
      )$set(_nameForDiscFolder,$replace(%_nameForDiscFolder%,@OSLASH@@OBRACKET@,/))$noop(
      )$set(_nameForDiscFolder,$replace(%_nameForDiscFolder%,@CBRACKET@,)),$noop(
      )$if($eq(%_mergeDiscWhenNotUsingSubfolder%,1),$noop(
        )$unset(_nameForDiscFolder),$noop(
        )$set(_nameForDiscFolder,$replace(%_nameForDiscFolder%,@OSLASH@@OBRACKET@,[))$noop(
        )$set(_nameForDiscFolder,$replace(%_nameForDiscFolder%,@CBRACKET@,]))$noop(
      ))$noop(
    ))$noop(
    )$if(%_nameForDiscFolder%, %_nameForDiscFolder%)
)/

$noop(★ Track. Title ★)
$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(%_useSubDiscFolder%,0),$eq(%_mergeDiscWhenNotUsingSubfolder%,1)),%discnumber%))$num(%tracknumber%,2). )
)
%_titleForFilename%

#2

I can’t really help you, but I wonder why someone would

The character & is perfectly fine for windows file- and pathnames.


#3

Hello… Again!

I work on a script:

-MultiLanguage
-Configurable
-Customizable
-Find: extension; release type, release status, is Lossles or not; Barcode; Multidisc and more!

a sample:

$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★                                    ULTIMATE renaming script BY RICKEY MANDRAQUE                                  ★)
$noop(★                                          Plugins Needed: islossless.py                                           ★)
$noop(★                                Forked from Ski-lleR’s script and FragaGeddon's script                            ★)
$noop(★        ki-lleR’s script: (https://github.com/Ski-lleR/Snippets/wiki/Renaming-script-for-MusicBrainz-Picard)      ★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★                    *** NE MODIFIEZ PAS LA ZONE CI-DESSOUS | LA ZONE MODIFIABLE SERA PLUS BAS ***                 ★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(########## INTERNATIONAL ######################################)
$noop(★ EDIT THIS TO SET LANGUAGE ★)
$set(_LangScript,EN)
$noop(
OPTION:
EN = ENGLISH
FR = FRANÇAIS
)



$noop(★ CUSTOM SUBFOLDER BY LANGUAGE ★)
$noop(★ COMMON ★)
$set(_albumSubFolder,Albums/)
$set(_singlesSubFolder,Singles/)
$set(_epSubFolder,EP/)

$noop(★ ENGLISH ★)



$set(_liveSubFolderEN,Lives/)
$set(_broadcastSubFolderEN,Broadcast/)
$set(_otherSubFolderEN,Others/)
$set(_ROfficialEN,Official/)
$set(_RPromoEN,Promotional/)
$set(_RBootlegEN,Bootleg/)
$set(_PseudoRDirEN,Pseudo-Releases/)
$set(_variousArtistsFolderEN,Various/)
$set(_nameForTypeVinylEN,Disc/)


  
$noop(★ FRANÇAIS ★)

$set(_liveSubFolderFR,Concerts/)
$set(_broadcastSubFolderFR,Diffusions/)
$set(_otherSubFR,Autres/)
$set(_ROfficialFR,Officiel/)
$set(_RPromoFR,Promotionel/)
$set(_RBootlegFR,Disques Pirates/)
$set(_PseudoRDirFR,Pseudo Albums/)
$set(_variousArtistsFolderFR,Various/)
$set(_nameForTypeVinylFR,Vinyl/)

$noop(######################### VARIBLES #########################)

$set(_LOfficial,_LOfficial)
$set(ROfficial,$get(_LOfficial%_LangScript%))






$noop(######################### SETTINGS #########################)

$noop(★ GLOBAL ★)
$set(_separateByTypeInArtistFolder,1)
$set(_separateAlbum,0)
$set(_useMusicBrainzStyleForVinylTrack,1)

$noop(★ Multi-Disc ★)
$set(_useSubDiscFolder,1)
$set(_mergeDiscWhenNotUsingSubfolder,0)
$set(_showDiscSubtitle,1)
$set(_nameForTypeCD,CD)
$set(_nameForTypeVinyl,$get(_nameForTypeVinyl%_LangScript%))

$noop(★ orderTypeForRoot ★)
$noop(★  1: Category [Last.fm.ng] ★)
$noop(★  2: Artist first letter ★)
$set(_orderTypeForRoot,1)

$noop(★ orderTypeForArtist ★)
$noop(★  1: First letter of first name ★)
$noop(★  2: First letter of last name ★)
$set(_orderTypeForArtist,2)

$noop(★ CUSTOM SUBFOLDER BY TYPE ★)
$set(_liveSubFolder,$get(_liveSubFolder%_LangScript%))
$set(_broadcastSubFolder,$get(_broadcastSubFolder%_LangScript%))
$set(_otherSubFolder,$get(_otherSubFolder%_LangScript%))

$noop(★ COMPILATION FOLDER [NO VARIOUS] ★)
$set(_compilationsSubFolder,Compilations/)

$noop(★ SOUNDTRACK/VARIOUS FOLDER ★)
$set(_soundTracksFolder,SoundTracks/)
$set(_variousArtistsFolder,$get(_variousArtistsFolder%_LangScript%))

$noop(★ CUSTOM SUBFOLDER BY RELEASES STATUS ★)
$set(ROfficial,$get(_ROfficial%_LangScript%))
$set(RPromo,$get(_RPromo%_LangScript%))
$set(RBootleg,$get(_RBootleg%_LangScript%))
$set(PseudoRDir,$get(_PseudoRDir%_LangScript%))

$noop(####################### END SETTINGS #######################)



$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 EP ★)
$if($in(%releasetype%,ep),
  $set(_isEP,1)
)

$noop(★ Detect Broadcast ★)
$if($in(%releasetype%,broadcast),
  $set(_isBroadcast,1)
)

$noop(★ Detect Other ★)
$if($in(%releasetype%,other),
  $set(_isOther,1)
)

$noop(★ Detect Artist Compilation ★)
$if($in(%releasetype%,compilation),
  $set(_isArtistCompil,1)
)

$noop(★ Detect Live ★)
$if($in(%releasetype%,live),
  $set(_isLive,1)
)

$noop(★ Detect Soundtrack ★)
$if($in(%releasetype%,soundtrack),
  $set(_isSoundTrack,1)
)

$noop(★ Detect Various Artist ★)
$if($eq(%albumartist%,Various Artists),
  $set(_isVarious,1)
)

$noop(★ Re-detect Compilation ★)
$if($eq(%compilation%,1),
  $set(_isGlobalCompil,1)
)
$noop(########## DETECT RELEASE STATUS ###############################)
$if($eq(%releasestatus%,official),
   $set(_isOfficial,1)
)
$if($eq(%releasestatus%,promotional),
   $set(_isPromo,1)
)

$if($eq(%releasestatus%,bootleg),
   $set(_isBootleg,1)
)

$if($eq(%releasestatus%,pseudo-release),
   $set(_isPseudoR,1)
)
$noop(########## RENAMER CORE ####################################)

$noop(★ Soundtrack in custom directory ★)
$if(%_isSoundTrack%,%_soundTracksFolder%,

  $noop(★ Various in custom directory ★)
  $if(%_isVarious%,%_variousArtistsFolder%,

$noop(##############################################)





$noop(################ Is It Lossless? ################)
$set(Quality0,)
$set(Quality1,$if($is_lossless(),Lossless,Lossy)/) 

$noop(################ FIND EXTENSION ################)
$set(_DirExt0,)
$set(_DirExt1,$if($in(%_extension%,wma),)$upper(%_extension%)/)

$noop(################ Vinyl Detection ###################)
$set(VinylDetect0,)
$set(VinylDetect1,$if($in(%media%,Vinyl),$noop(
  )$if($eq(%_useMusicBrainzStyleForVinylTrack%,1),$noop(
    )$if(%_musicbrainz_tracknumber%,%_musicbrainz_tracknumber%. ))))

$set(MainFolder0,)
$set(MainFolder1,-= $upper($left(%albumartist%,1)) =-/)                                                            $noop(★)
$set(MainFolder2,-= $upper($left(%albumartistsort%,1)) =-/)                                                        $noop(★)
$set(MainFolder3,$upper($left(%albumartist%,1))/)                                                                  $noop(★)
$set(MainFolder4,$upper($left(%albumartistsort%,1))/)                                                              $noop(★)
$set(Artist1,$replace($rreplace(%albumartist%,[_:*?"<>|],-),?,)/)                                                  $noop(★)
$set(Artist2,$replace($rreplace(%albumartistsort%,[_:*?"<>|],-),?,)/)

                                              $noop(★)
$set(TypeRelease0,)                                                                                                $noop(★)
$set(TypeRelease1,$if($or(%_isArtistCompil%,%_isGlobalCompil%),%_compilationsSubFolder%,
    $if($eq(%_isLive%,1),%_liveSubFolder%,
      $if($eq(%_isAlbum%,1),
        $if($eq(%_separateAlbum%,1),%_albumSubFolder%)
      )
      $if($eq(%_isSingle%,1),%_singlesSubFolder%)
      $if($eq(%_isEP%,1),%_epSubFolder%)
      $if($eq(%_isBroadcast%,1),%_broadcastSubFolder%)
      $if($eq(%_isOther%,1),%_otherSubFolder%)
    )
  )
)



$set(StatusRelease0,)
$set(StatusRelease1,
  $if($eq(%_isOfficial%,1),%ROfficial%,
    $if($eq(%_isPromo%,1),%RPromo%,
      $if($eq(%_isBootleg%,1),%RBootleg%,
        $if($eq(%_isPseudoR%,1),%PseudoRDir%,
        )
      )
    )
  )
)
                                         $noop(★)
$set(Album1,$replace($rreplace(%album%,[_:*?"<>|], -),?,)$if(%date%,$if(%album%, )[$left(%date%,4)]))              $noop(★)
$set(Album2,$replace($rreplace(%album%,[_:*?"<>|], -),?,))                                                         $noop(★)
$set(Album3,$if(%date%,$if(%album%, )$left(%date%,4))/$replace($rreplace(%album%,[_:*?"<>|], -),?,))               $noop(★)

$noop(################ FIND BARCODE ################)
$set(EANCode0,/)
$set(EANCode1, $if(%barcode%,$if(%album%, )[(%barcode%)])/)                                                 $noop(★)
$set(EANCode2,/$if(%barcode%,$if(%album%, )%barcode%)/)   

$noop(################ MULTIDISC FUNCTION ################)
$set(MultiDisc0,)
$set(MultiDisc1,$if($gt(%totaldiscs%,1),Disc $num(%discnumber%,1)/)                                                $noop(★)
$set(MultiDisc2,$if($eq(%_useMusicBrainzStyleForVinylTrack%,1),$if($gt(%totaldiscs%,1),%discnumber%-,)))

$noop(################ FILE NAME OPTIONS ################)
$set(PreTitle0,)                                                                                                   $noop(★)
$set(PreTitle1,$replace($rreplace(%albumartist% - %album% -,[_:*?"<>|], -),?,))                                    $noop(★)
$set(Track0,)                                                                                                      $noop(★)
$set(Track1,$if($eq(%_useMusicBrainzStyleForVinylTrack%,1),$num(%tracknumber%,2) - ))                                                                             $noop(★)
$set(Track2,$if($eq(%_useMusicBrainzStyleForVinylTrack%,1)$num(%discnumber%,1),-$num(%tracknumber%,2) - )))                                                       $noop(★)
$set(Title,$replace($rreplace(%title%,[_:*?"<>|],),?,))
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)



%Quality1%        $noop(
                           OPTION 0 = Aucun dossier ne sera créé.|
                           OPTION 1 un dossier Lossless ou Lossly sera créer suivant la qualité du fichier.
                             )

%_DirExt1%        $noop(  Permet de créer un dossier en correspondance des fichiers
                          OPTION 0 = disabled
                          OPTION 1 = Folders in upper case
                          OPTION 2 = Folders in lower case                                    )


%MainFolder4%      $noop(
                          OPTION 0 Aucun dossier avec un seul caractère uniquement ne sera créé.|
                          OPTION 1 un dossier du type -= A=- sera créer à partir du nom du groupe avec l'article The; le; la; les. ex: A Chemical Romance => MyMusic/-= A=-/A Chemical Romance/ |
                          OPTION 2 un dossier du type -= W =- sera créer à partir du nom du groupe sans l'article The; le; la; les. ex: The Wriggles => MyMusic/-= W =-/The Wriggles  |
                          OPTION 3 A identique a l'OPTION 1. |
                          OPTION 4 A identique a l'OPTION 2. |                  )

%Artist1%          $noop(
                          OPTION 1 = Amy WineHouse
                          OPTION 2 = Winehouse, Amy                             )
%StatusRelease1%   $noop(
                          OPTION 0 = disabled
                          OPTION 1 = enabled                                    )
%TypeRelease1%    $noop(
                          OPTION 0 = disabled
                          OPTION 1 = enabled                                    )

%Album3%          $noop(
                          OPTION 1 = Back to Black [2007]
                          OPTION 2 = Back to Black
                          OPTION 3 = 2007/Back to Black                          )
%EANCode2%        $noop(
                          OPTION 1 = code barre a coté du titre de l'album
                          OPTION 2 = code barre dans un dossier
                          OPTION 3 = pas de code barre                          )
%MultiDisc2%      $noop(
                          OPTION 0 = Ne pas trier par disque, mettre tous les fichiers dans un seul dossier sans numérotation.
                          OPTION 1 = Si l'album a plus d'un disque, alors ajouter des dossiers de disque
                          OPTION 2 = Si l'album a plus d'un disque, alors ajouter le numéro du disque au début du nom de fichier
                                                                                )
%PreTitle2%        $noop(
                          OPTION 0 = Ne pas afficher l'artiste ou l'album dans le nom de fichiers
                          OPTION 1 = Afficher l'artiste et l'album dans le titre de la piste
                          OPTION 2 = Ne pas afficher l'artiste ou l'album      )
%Track1%          $noop(
                          OPTION 0 = pas de numéros de piste
                          OPTION 1 = Numéro de piste: 01
                          OPTION 2: Numéro de piste: 1-01-> C'est mieux si MultiDisc est réglé sur 3, car vous aurez 2 numéros de piste comme 01 - * noms de piste *, etc.
                          N.B.: si vous activez cette option, le numéro du disque sera inscrit POUR TOUJOURS MÊME SI IL N'Y QU'UN SEUL DISQUE.
                                                                                )
%Title%            $noop(
                          PAS D'OPTION - Il suffit d'afficher le nom de la piste.)

It not working for now.


#4

Nice, look forward to seeing it finished. The one I posted does alot of what I want, just wish I could turn things off and on and the order. Hope you make yours as flexible as it sounds. I would help, but I do not know how to script in this. Love the extension option.


#5

It’s in french for now (because i’m french) and all options will be disabled and scalable.