Looking for the ultimate renaming script!


#1

Hello,
I would like to find a solution to rename my collection in this way:

MyMusic/FileExtension/1stLetterArtist/Artist/Year/Album (barcode)/CDnumber-tracknumber - Title.ext

eg:
Mymusic/FLAC/B/The Beatles/1965/Help ! (3025478935164)/2-7 - Ticket To Ride.flac Mymusic/AAC/B/The Beatles/1965/Help ! (3025478935164)/2-7 - Ticket To Ride.m4a Mymusic/WMA/B/The Beatles/1965/Help ! (3025478935164)/2-7 - Ticket To Ride.wma

I am confronted with different problems such as:

  • Artists whose name begins with a number must go to a single folder named “0-9”
  • Artists whose names begin with a symbol must go to a single folder named “Other Names”
  • Artists whose name begins with “The”, “Le”, “La”, “Les” must go to the good folder (“B” for “The Beatles”)
  • Some releases have no barcode and the album is named “Album Title ()”
  • Some releases have an identical barcode depending on the country.
  • I’m not sure that the barcode is a good way of disambiguation, is there any possibility of recovering disambiguation comments as “Title of album the royal platinium edition it cost me a leg”?
  • Some albums, like Ben Harper, are in separate files, how to get them together? (“Ben Harper”, “Ben Harper and the innocent criminals”, “Ben Harper and Relentless7”, "Ben Harper at the beach "etc …)
  • Some albums in cyrillic as naming “---------.mp3”

To solve these problems, I found this:

this script that I made changes. it will be my basic script.

Ski-lleR’s script on this forum but I don’t understand everything without many comments

Islosless plugin, not compatible with picard 1.2 but i added:

PLUGIN_API_VERSIONS = ["1.2.0", "1.3.0"]
and it seem not working.
With paramaters:
%artist%/$if($is_lossless(),lossless,lossy)/%album%/%title%
I have this error:
Wrong number of arguments for $is_lossless: Expected O, at position 28, line 1

$if2(%albumartist%,%artist%$if($is_lossless(),lossless,lossy)/%album%/$if($gt(%totaldiscs%,1),%discnumber%-,)$num(%tracknumber%,2)$if(%compilation%, %artist% -,) %title%
return error:
Wrong number of arguments for $is_lossless: Expected O, at position 46, line 1

so

$if2(%albumartist%,%artist%($if($is_lossless(),lossless,lossy))/%album%/$if($gt(%totaldiscs%,1),%discnumber%-,)$num(%tracknumber%,2)$if(%compilation%, %artist% -,) %title%
return error:
Unexpected character '(' at position 29, line 1

My conf:
Debian GNU/Linux 8 (jessie) 64 bits Linux 4.9.0-0.bpo.6-amd64 #1 SMP Debian 4.9.82-1+deb9u3~bpo8+1 (2018-03-22) x86_64 GNU/Linux
MusicBrainz Picard Version 1.2
Plugins actived:

  • Decode Cyrillic
  • Add Cluster As Realease
  • Generate Cuesheet
  • Generate M3U Playlist
  • No release
  • Open File in the GUI environnement
  • Release Type
  • Soundtrack
  • Tagger script Function is_lossless() and is_lossy() (islossless.py)

FragaGeddon’s script:

    $noop( *** NE MODIFIEZ PAS LA ZONE CI-DESSOUS | LA ZONE MODIFIABLE SERA PLUS BAS *** )
    			$set(MainFolder1,-= $upper($left(%albumartist%,1)) =-/)
    			$set(MainFolder2,-= $upper($left(%albumartistsort%,1)) =-/)
    			$set(MainFolder3,$upper($left(%albumartist%,1))/)
    			$set(MainFolder4,)
    			$set(Artist1,$replace($rreplace(%albumartist%,[_:*?"<>|],-),?,)/)
    			$set(Artist2,$replace($rreplace(%albumartistsort%,[_:*?"<>|],-),?,)/)
    			$set(Album1,$replace($rreplace(%album%,[_:*?"<>|], -),?,)$if(%date%,$if(%album%, )[$left(%date%,4)])/)
    			$set(Album2,$replace($rreplace(%album%,[_:*?"<>|], -),?,)/)
    			$set(Album3,$replace($rreplace(%album%,[_:*?"<>|], -),?,)$if(%barcode%,$if(%album%, )[$left(%barcode%,13)])/)
    			$set(MultiDisc1,$if($gt(%totaldiscs%,1),Disc $num(%discnumber%,1)/)
    			$set(MultiDisc2,)
    			$set(PreTitle1,$replace($rreplace(%albumartist% - %album% -,[_:*?"<>|], -),?,))
    			$set(PreTitle2,)
    			$set(Track1, $num(%tracknumber%,2) - )
    			$set(Track2, $num(%discnumber%,1)-$num(%tracknumber%,2) - ))
    			$set(Title,$replace($rreplace(%title%,[_:*?"<>|],),?,))
    $noop( *** NE MODIFIEZ PAS LA ZONE CI-DESSOUS | LA ZONE MODIFIABLE SERA PLUS BAS *** )




    $noop( *** Le suivant utilisera l'exemple de cette artiste: Amy Winehouse and album: Back to Black *** )
    $noop( *** Sortie par défaut: -=A =-/Amy Winehouse/Back to Black [2007]/Disc 1/Amy Winehouse - Back to Black - 01 - Rehab *** )
    $noop( *** Changez la valeur NUMERIQUE UNIQUEMENT! Exemple:%MainFolder1% sera remplacé par %MainFolder2% *** )
    $noop( *** Changez seulement la valeur numérique en 1 ou 2, n'importe quoi d'autre va mettre la pagaille. *** )
    %MainFolder3%	$noop( OPTION 1 -= A=- | OPTION 2 -= W =- | OPTION 3 A | OPTION 4 = Aucun dossier avec un seul caractère uniquement ne sera créé. )
    %Artist1%			$noop( OPTION 1 = Amy WineHouse| OPTION 2 = Winehouse, Amy )
    %Album1%			$noop( OPTION 1 = Back to Black [2007] | OPTION 2 = Back to Black )
    %MultiDisc1%		$noop(OPTION 1 = Si l'album a plus d'un disque, alors ajouter des dossiers de disque | OPTION 2 = Ne pas trier par disque, mettre tous les fichiers dans un seul dossier.)
    %PreTitle2%		$noop(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 1 = Numéro de piste: 01 | OPTION 2: Numéro de piste: 1-01-> C'est mieux si MultiDisc est réglé sur 2, car vous aurez 2 numéros de piste comme 01 - * noms de piste *, etc.)
    %Title%				$noop(PAS D'OPTION - Il suffit d'afficher le nom de la piste.)


Thank you.

edit1: i've been update to picard 1.3.2

#2

The News:

I found Many solutions

$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(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$set(_useMusicBrainzStyleForVinylTrack,1)
$set(Quality0,)
$set(Quality1,$if($is_lossless(),Lossless,Lossy)/)                                                                 $noop(★)
$set(_DirExt0,)
$set(_DirExt1,$upper(%_extension%)/)                                                                                                    $noop(★)
$set(VinylDetect0,)
$set(VinylDetect1,$if($in(%media%,Vinyl),$noop(
  )$if($eq(%_useMusicBrainzStyleForVinylTrack%,1),$noop(
    )$if(%_musicbrainz_tracknumber%,%_musicbrainz_tracknumber%. ))))
$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(MainFolder5,)                                                                                                 $noop(★)
$set(Artist1,$replace($rreplace(%albumartist%,[_:*?"<>|],-),?,)/)                                                  $noop(★)
$set(Artist2,$replace($rreplace(%albumartistsort%,[_:*?"<>|],-),?,)/)                                              $noop(★)
$set(TypeRelease0,)                                                                                                $noop(★)
$set(TypeRelease1,$if(%releasetype%,$if(%album%, )$upper(%releasetype%))/)                                         $noop(★)
$set(StatusRelease0,)                                                                                              $noop(★)
$set(StatusRelease1,$if(%releasestatus%,$if(%album%, )%releasestatus%)/)                                           $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(★)
$set(EANCode1, $if(%barcode%,$if(%album%, )[$left(%barcode%,4)])/)                                                 $noop(★)
$set(EANCode2,/$if(%barcode%,$if(%album%, )%barcode%)/)                                                            $noop(★)
$set(EANCode3,/)                                                                                                   $noop(★)
$set(MultiDisc1,$if($gt(%totaldiscs%,1),Disc $num(%discnumber%,1)/)                                                $noop(★)
$set(MultiDisc2,$if($eq(%_useMusicBrainzStyleForVinylTrack%,1),$if($gt(%totaldiscs%,1),%discnumber%-,)))                                                           $noop(★)
$set(MultiDisc3,)                                                                                                  $noop(★)
$set(PreTitle1,$replace($rreplace(%albumartist% - %album% -,[_:*?"<>|], -),?,))                                    $noop(★)
$set(PreTitle2,)                                                                                                   $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(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★                    *** NE MODIFIEZ PAS LA ZONE CI-DESSUS | LA ZONE MODIFIABLE SERA PLUS BAS ***                  ★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)



%Quality1%					$noop(
                           OPTION 1 un dossier Lossless ou Lossly sera créer |
                           OPTION 2 = Aucun dossier ne sera créé. )

%_DirExt1%
%MainFolder4%				$noop(
                          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.  |
                          OPTION 5 Aucun dossier avec un seul caractère uniquement ne sera créé. )

%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                          )
%VinylDetect1%
%MultiDisc2%				$noop(
                          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
                          OPTION 3 = Ne pas trier par disque, mettre tous les fichiers dans un seul dossier sans numérotation.
                                                                                )
%PreTitle2%				$noop(
                          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.)


So, I don’t found how to create a directory with a extension
ex: MyMusic/Lossless/FLAC/A/Amy Winehouse/…
MyMusic/Lossly/MP3/A/Amy Winehouse/…

edit: I’ve found!

I have a problem with vinyl detection, the script rename with A1; B2; … With 1-01; 2-02; …

this function work fine:

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

It can enable or disable “Vinyl detection” but it’s not work with:

$set(MultiDisc1,$if($gt(%totaldiscs%,1),Disc $num(%discnumber%,1)/)                                                $noop(★)
$set(MultiDisc2,$if($eq(%_useMusicBrainzStyleForVinylTrack%,1),$if($gt(%totaldiscs%,1),%discnumber%-,)))                                                           $noop(★)
$set(MultiDisc3,)                                                                                                  $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) - )))   

Capture%20d'%C3%A9cran%20de%202018-05-30%2014-28-55
Good renaming but cd number and tacks as like cd
Edit: I’ve found another Solutions! Work In Progress!


#3

Nice. I’ve been thinking of adding vinyl numbering to my script, but I hadn’t yet looked at how to go about it. Following your example will make it a lot easier.


#4

Hello,
I intend to release a full script, you can follow the devellopement on My Github


#5

Hello,
Here the progress of my work is not finished but it takes shape gradually.

$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★)
$noop(★                                   FPS Fatal Picard 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(################ LANGUAGE SELECTION ################)
$noop(★ EDIT THIS TO SET LANGUAGE ★)
$set(_LangScript,FR)
$noop(
OPTION:
EN = ENGLISH
FR = FRANÇAIS
)
$noop(############# Not Implemented #################
ES = ESPAÑOL
PT = PORTUGUÊS
DE = DEUTCH
NL = NEDERLANDS
IT = ITALIANO

)
$noop(################ END OF LANGUAGE SELECTION ################)
$noop(########## INTERNATIONAL ##########)

$noop(★ CUSTOM SUBFOLDER BY LANGUAGE ★)
$noop(★ COMMON ★)
$noop(★ NO VARIATION  ★)

$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(########## END OF INTERNATIONAL ##########)
$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(########## END OF DETECT MUSIC TYPE ##########)
$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(########## DETECT RELEASE STATUS ##########)
$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(################ END OF Is It Lossless? ################)
$noop(################ FIND EXTENSION ################)
$noop(★ In Picard 1.3.2 the wma extension is not recognized ★)
$set(_DirExt0,)
$set(_DirExt1,$upper(%_extension%)/)
$set(_DirExt2,$lower(%_extension%)/)
$noop(################ END OF FIND EXTENSION ################)
$set(MainFolder0,)
$set(MainFolder1,-= $upper($left(%albumartist%,1)) =-/)
$set(MainFolder2,-= $upper($left(%albumartistsort%,1)) =-/)
$set(MainFolder3,$upper($left(%albumartist%,1))/)
$set(MainFolder4,$upper($left(%albumartistsort%,1))/)
$set(Artist1,$replace($rreplace(%albumartist%,[_:*?"<>|],-),?,)/)                                                  $noop(★)
$set(Artist2,$replace($rreplace(%albumartistsort%,[_:*?"<>|],-),?,)/)
$set(StatusRelease0,)
$set(StatusRelease1,
  $if($eq(%_isOfficial%,1),%ROfficial%,
    $if($eq(%_isPromo%,1),%RPromo%,
      $if($eq(%_isBootleg%,1),%RBootleg%,
        $if($eq(%_isPseudoR%,1),%PseudoRDir%,
        )
      )
    )
  )
)
$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(Album0,)
$set(Album1,$replace($rreplace(%album%,[_:*?"<>|], -),?,)$if(%date%,$if(%album%, )[$left(%date%,4)]))
$set(Album2,$replace($rreplace(%album%,[_:*?"<>|], -),?,))
$set(Album3,$if(%date%,$if(%album%, )$left(%date%,4))/$replace($rreplace(%album%,[_:*?"<>|], -),?,))
$noop(################ FIND BARCODE ################)
$set(EANCode0,/)
$set(EANCode1,$if(%barcode%,$if(%album%, )[%barcode%])/)
$set(EANCode2,/$if(%barcode%,$if(%album%, )%barcode%)/)
$noop(################ END OF FIND BARCODE ################)
$noop(################ MULTIDISC FUNCTION ################)
$set(MultiDisc0,)
$set(MultiDisc1,$if($gt(%totaldiscs%,1),Disc $num(%discnumber%,1)/)
$set(MultiDisc2,$if($gt(%totaldiscs%,1),%discnumber%-,)))
$noop(################ END OF MULTIDISC FUNCTION ################)
$noop(################ SEARCH BITRATE ################)
$noop($set(_numbr,$left(%_bitrate%,3)))
$set(BitrateNumber0,)
$set(BitrateNumber1,$if($eq(%_bitrate%,320.0),
$set(_folderbr,320),
$if($eq(%_bitrate%,256.0),$set(_folderbr,256),
$if($eq(%_bitrate%,192.0),$set(_folderbr,192),
$if($eq(%_bitrate%,160.0),$set(_folderbr,160),
$if($eq(%_bitrate%,128.0),$set(_folderbr,128),
$if($eq(%_bitrate%,64.0),$set(_folderbr,64)))))))
$if(%_folderbr%,,
$if($gte(%_numbr%,220),$set(_folderbr,V0),
$if($lt(%_numbr%,220),$set(_folderbr,V2),
$set(_folderbr,Err1)
)))
$if($eq($upper(%_extension%),MP3), [%_folderbr%K]))

$set(BitrateNumber2,$if($eq(%_bitrate%,320.0),
$set(_folderbr,320),
$if($eq(%_bitrate%,256.0),$set(_folderbr,256),
$if($eq(%_bitrate%,192.0),$set(_folderbr,192),
$if($eq(%_bitrate%,160.0),$set(_folderbr,160),
$if($eq(%_bitrate%,128.0),$set(_folderbr,128),
$if($eq(%_bitrate%,64.0),$set(_folderbr,64)))))))
$if(%_folderbr%,,
$if($gte(%_numbr%,220),$set(_folderbr,V0),
$if($lt(%_numbr%,220),$set(_folderbr,V2),
$set(_folderbr,Err1)
)))
$if($eq($upper(%_extension%),MP3),/%_folderbr%K))

$set(BitrateNumber3,$if($eq(%_bitrate%,320.0),
$set(_folderbr,320),
$if($eq(%_bitrate%,256.0),$set(_folderbr,256),
$if($eq(%_bitrate%,192.0),$set(_folderbr,192),
$if($eq(%_bitrate%,160.0),$set(_folderbr,160),
$if($eq(%_bitrate%,128.0),$set(_folderbr,128),
$if($eq(%_bitrate%,64.0),$set(_folderbr,64)))))))
$if(%_folderbr%,,
$if($gte(%_numbr%,220),$set(_folderbr,V0),
$if($lt(%_numbr%,220),$set(_folderbr,V2),
$set(_folderbr,Err1)
)))
$if($eq($upper(%_extension%),MP3), [%_folderbr%K %_sample_rate% %_channels%]))

$set(BitrateNumber4,$if($eq(%_bitrate%,320.0),
$set(_folderbr,320),
$if($eq(%_bitrate%,256.0),$set(_folderbr,256),
$if($eq(%_bitrate%,192.0),$set(_folderbr,192),
$if($eq(%_bitrate%,160.0),$set(_folderbr,160),
$if($eq(%_bitrate%,128.0),$set(_folderbr,128),
$if($eq(%_bitrate%,64.0),$set(_folderbr,64)))))))
$if(%_folderbr%,,
$if($gte(%_numbr%,220),$set(_folderbr,V0),
$if($lt(%_numbr%,220),$set(_folderbr,V2),
$set(_folderbr,Err1)
)))
$if($eq($upper(%_extension%),MP3),/[%_folderbr%K - %_sample_rate% %_channels%]))
$noop(################ END OF SEARCH BITRATE ################)
$noop(################ FILE NAME OPTIONS ################)
$set(PreTitle0,)                                                                                                   $noop(★)
$set(PreTitle1,$replace($rreplace(%albumartist% - %album% -,[_:*?"<>|], -),?,))                                    $noop(★)
$set(Track0,)                                                                                                      $noop(★)
$set(Track1,$num(%tracknumber%,2) - )
$set(Track2,$num(%discnumber%,1)-$num(%tracknumber%,2) - )
$set(Title,$replace($rreplace(%title%,[_:*?"<>|],),?,))


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

%_DirExt1%
%MainFolder4%				$noop(
                          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. |
                          OPTION 5 Aucun dossier avec un seul caractère uniquement ne sera créé. )

%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                          )
%BitrateNumber3%
%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 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
                          OPTION 3 = Ne pas trier par disque, mettre tous les fichiers dans un seul dossier sans numérotation.
                                                                                )
%PreTitle2%					$noop(
                          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’s in French for now but it’s work.

Todo: detection of vinyl is to be implemented.

Work In Progress.