Page 3 of 3

Re: How about sharing our format expressions?

Posted: 28 Sep 2018, 20:13
by ChefGregS
I don't use MusicBrainz....sorry.

Greg

Re: How about sharing our format expressions?

Posted: 01 Oct 2018, 01:29
by DevXen
Hey, Thanks for your message, I apologize it took so long to reply, i've been busy with a new job with crazy hours, and had no idea i had a message... I believe this is my latest picard script. I don't really have time to go through and explain all that it does. but it's amazing. I made it for me and how I wanted it. so it'll separate by genre, band, album, disc. (disc name). it'll add extra info to the song as available. (demo, etc) separate soundtracks, various, etc. if an album has more than half of the songs but not a complete album it'll move them to the [unfinished albums] folder. if it has less than 5 songs, they go to the misc folder. Also i didn't realize at the time i had to backup my Variables when it backed up my script. and that PC crashed. so you'll have to go setup the variables it needs. which i'd assume it'll give you errors if they aren't there. I haven't had time to go in and figure those out. as i'm at the moment using a much much simpler script to get my google music songs organized. after i'm done with that i'll go back to this one to finish organizing my main collection. but I wouldn't count on it being anytime soon.


Newest Working version: Separates Incomplete Albums and Misc songs & reads Album/Bonus from album folder

Code: Select all

$set(title,$replace(%title%,...,…))
$set(album,$replace(%album%,...,…))
$set(artist,$replace(%artist%,...,…))
$set(albumartist,$replace(%albumartist%,...,…))
$if(%originaldate%,$set(date,%originaldate%))
$set(filename,%_filename%)
$set(foldername,%_dirname%)

$if($in(%title%,Live),$set(_misctype,Live))
$if($in(%title%,Demo),$set(_misctype,Demos))
$if($in(%title%,Acoustic),$set(_misctype,Acoustic))
$if($in(%title%,Unplugged),$set(_misctype,Acoustic))
$if($in(%title%,Remix),$set(_misctype,Remixes))

$if($in($lower(%_dirname%),album),$if($not(%discsubtitle%),$set(disctitle,Album)))
$if($in(%_dirname%,Bonus),$if($not(%discsubtitle%),$set(disctitle,Bonus Disc)))


$if($gte($matchedtracks(),$div(%totaltracks%,2)),$set(_miscorincomplete,Incomplete),$set(_miscorincomplete,Misc))
$if($gte($matchedtracks(),%totaltracks%),$unset(_miscorincomplete) $unset(_misctype))
$if($lte($sub(%totaltracks%,$matchedtracks()),1),$set(_numberofmissingtracks,$sub(%totaltracks%,$matchedtracks())$unset(_pluaralmissingtracks)))
$if($gt($sub(%totaltracks%,$matchedtracks()),1),$set(_numberofmissingtracks,$sub(%totaltracks%,$matchedtracks())$set(_pluaralmissingtracks,s)))


$if($in(%album%,Tribute),$set(_tribute,Tributes))
$if($in(%album%,tribute),$set(_tribute,Tributes))

$if($eq(%releasetype%,compilation),$set(releasetype,[Compilation Albums]))
$if($eq(%releasetype%,remix),$set(releasetype,[Remixes]) $set(tributetype,[Remixes]))



$if($eq(%releasetype%,soundtrack),$set(releasetype,[Soundtracks]))

$if($eq(%releasetype%,album),$set(releasetype,[Studio Albums]))
$if($eq(%releasetype%,live),$set(releasetype,[Live Albums]))
$if($eq(%releasetype%,single),$set(releasetype,[Singles]))
$if($eq(%releasetype%,ep),$set(releasetype,[EPs]))

$if(%_releasecomment%, $set(_releasecomment,\(%_releasecomment%\)),$noop())
$if($and($eq(%releasecountry%,JP),$not($in(%_releasecomment%,Japan))),$set(_releasecomment,%_releasecomment% \(Japan Import\)))
$if($and($eq(%releasecountry%,RU),$not($in(%_releasecomment%,Russia))),$set(_releasecomment,%_releasecomment% \(Russian Import\)))
$if($and($eq(%releasecountry%,XE),$not($in(%_releasecomment%,Europe))),$set(_releasecomment,%_releasecomment% \(European Import\)))
$if($and($eq(%releasecountry%,AU),$not($in(%_releasecomment%,Australia))),$set(_releasecomment,%_releasecomment% \(Australian Import\)))
$if($and($eq(%releasecountry%,DE),$not($in(%_releasecomment%,German))),$set(_releasecomment,%_releasecomment% \(German Import\)))
$if($and($eq(%releasecountry%,FI),$not($in(%_releasecomment%,Finland))),$set(_releasecomment,%_releasecomment% \(Finland Import\)))
$if($and($eq(%releasecountry%,FR),$not($in(%_releasecomment%,France))),$set(_releasecomment,%_releasecomment% \(France Import\)))



$if($in(%album%, Punk ),$set(tributetype,Punk))
$if($in(%album%, Rock ),$set(tributetype,Rock))
$if($in(%album%, Metal ),$set(tributetype,Metal))
$if($in(%album%, Bluegrass ),$set(tributetype,Bluegrass))
$if($in(%album%, Acoustic ),$set(tributetype,[Acoustic]))
$if($in(%album%,Gothic Acoustic),$set(tributetype,[Gothic Acoustic Series]))
$if($in(%album%,Pickin' On ),$set(tributetype,[Pickin' On Series]))
$if($in(%album%, Industrial ),$set(tributetype,Industrial))
$if($in(%album%, Techno ),$set(tributetype,Techno))
$if($in(%album%,Tribute),$set(_tribute,Tributes))
$if($in(%album%, Quartet ),$set(tributetype,[String Quartet Series]))
$if($in(%album%,Remix),$set(tributetype,[Remixes]))

$if($in(%album%,Symphonic),$set(_tribute,Tributes))
$if($in(%album%,Symphonic),$set(tributetype,[Symphonic]))


$if($in(%album%, Lullaby Renditions),$set(_tribute,Tributes))
$if($in(%album%, Lullaby Renditions),$set(tributetype,[Lullaby Renditions]))

$if($in(%album%, Piano ),$set(_tribute,Tributes))
$if($in(%album%, Piano ),$set(tributetype,[Piano Series]))

$if($not(%tributetype%),$set(tributetype,[Various Artists]))



$if($in(%releasetype%,[Soundtracks]),$set(_tribute,Soundtracks)$unset(tributetype))


$replace($replace($replace($replace($replace($replace($replace($replace($replace(

$if($eq(%compilation%,1),

$if(%_tribute%,[%_tribute%]/
$if(%tributetype%,%tributetype%)/
$if(%date%, [$left(%date%,4)]) - %album%
$if(%_releasecomment%, %_releasecomment%)
$if($and($ne(%totaldiscs%,1),$not($in(%totaldiscs%,1))),\(%totaldiscs% Disc Set\),$noop())
$if($gt(%totaldiscs%,1),/Disc $num(%discnumber%,2)
$if(%discsubtitle%, - \(%discsubtitle%\)))/
$num(%tracknumber%,2) - %artist% - %title%
$if(%discsubtitle%,\(%discsubtitle%\)))

$if($eq(%albumartist%,Various Artists),
$if($not(%_tribute%),Various Artists/%releasetype%/
$if(%date%, [$left(%date%,4)]) - %album%
$if(%_releasecomment%, %_releasecomment%)
$if($and($ne(%totaldiscs%,1),$not($in(%totaldiscs%,1))),\(%totaldiscs% Disc Set\),$noop())
$if($gt(%totaldiscs%,1),/Disc $num(%discnumber%,2)
$if(%discsubtitle%, - \(%discsubtitle%\)))/
$num(%tracknumber%,2) - %artist% - %title%
$if(%discsubtitle%,\(%discsubtitle%\))))

$if($not($eq(%albumartist%,Various Artists)),
$if($not(%_tribute%),Various Artists/%releasetype%/
$if(%date%, [$left(%date%,4)]) - %album%
$if(%_releasecomment%, %_releasecomment%)
$if($and($ne(%totaldiscs%,1),$not($in(%totaldiscs%,1))),\(%totaldiscs% Disc Set\),$noop())
$if($gt(%totaldiscs%,1),/Disc $num(%discnumber%,2)
$if(%discsubtitle%, - \(%discsubtitle%\)))/
$num(%tracknumber%,2) - %artist% - %title%
$if(%discsubtitle%,\(%discsubtitle%\)))))

,*,[x]),?,),:, -),",'),_, ),|, ),<,[),>,]), , )


$replace($replace($replace($replace($replace($replace($replace($replace($replace(

$if($not($eq(%compilation%,1)),
$if(%_tribute%,[%_tribute%]/
$if(%tributetype%,%tributetype%)/
$if(%date%, [$left(%date%,4)]) - %album%$if($ne(%originalyear%,$left(%date%,4)),
$if(%originalyear%, \(%originalyear% Reissue\)))
$if(%_releasecomment%, %_releasecomment%)
$if($and($ne(%totaldiscs%,1),$not($in(%totaldiscs%,1))),\(%totaldiscs% Discs\),$noop())
$if($gt(%totaldiscs%,1),/Disc $num(%discnumber%,2)
$if(%discsubtitle%, - \(%discsubtitle%\)))/
%artist% - $num(%tracknumber%,2) - %title%
$if(%discsubtitle%,\(%discsubtitle%\)))

$if($not(%_tribute%),
$if(%_miscorincomplete%,
$if($eq(%_miscorincomplete%,Misc),
$if2(%grouping%,Unknown)/$if2(%genre%,Unknown)/
$if2(%albumartistsort%,%artistsort%,%albumartist%,%artist%)/
$if(%_misctype%,[%_misctype%]/,[Misc]/)
%artist% -$if(%album%, %album% -) $num(%tracknumber%,2) - %title%)

$if($eq(%_miscorincomplete%,Incomplete),
$if2(%grouping%,Unknown)/$if2(%genre%,Unknown)/
$if2(%albumartistsort%,%artistsort%,%albumartist%,%artist%)/
$if(%_miscorincomplete%, [Incomplete Albums]/)
$if(%date%, [$left(%date%,4)]) - %album% $if(%_numberofmissingtracks%, \($num(%_numberofmissingtracks%,2) Track$if(%_pluaralmissingtracks%,%_pluaralmissingtracks%) Missing\))
$if($ne(%originalyear%,$left(%date%,4)),
$if(%originalyear%, \(%originalyear% Reissue\)))
$if(%_releasecomment%, %_releasecomment%)
$if($and($ne(%totaldiscs%,1),$not($in(%totaldiscs%,1))),\(%totaldiscs% Discs\),$noop())
$if($gt(%totaldiscs%,1),/Disc $num(%discnumber%,2)
$if(%discsubtitle%, - \(%discsubtitle%\)))/
%artist% - $num(%tracknumber%,2) - %title%
$if(%discsubtitle%,\(%discsubtitle%\)))))

$if($not(%_miscorincomplete%),
$if2(%grouping%,Unknown)/$if2(%genre%,Unknown)/
$if2(%albumartistsort%,%artistsort%,%albumartist%,%artist%)/
$if(%releasetype%, %releasetype%/)
$if(%date%, [$left(%date%,4)]) - %album%
$if($ne(%originalyear%,$left(%date%,4)),
$if(%originalyear%, \(%originalyear% Reissue\)))
$if(%_releasecomment%, %_releasecomment%)
$if($and($ne(%totaldiscs%,1),$not($in(%totaldiscs%,1))),\(%totaldiscs% Discs\),$noop())
$if($gt(%totaldiscs%,1),/Disc $num(%discnumber%,2) $if(%disctitle%, - \(%disctitle%\))
$if(%discsubtitle%, - \(%discsubtitle%\)))/
%artist% - $num(%tracknumber%,2) - %title%
$if(%discsubtitle%,\(%discsubtitle%\))))

,*,[x]),?,),:, -),",'),_, ),|, ),<,[),>,]), , )

Re: How about sharing our format expressions?

Posted: 19 Oct 2018, 14:34
by iAmKoinu
Hey there! Been using Filebot for a few months now, and thought I'd share the expressions I have for my collection! :D They're on the simpler side, but it gets the job done for me :)

All of mine are based off of different drives.

Movies:
F:/Movies/{n.lowerTrail().colon(' - ')} ({y})/{n.lowerTrail().colon(' - ')}.[{d.format('MMM-dd-yyyy')}]
Example:
F:/Movies/The Greatest Showman (2017)/The Greatest Showman.[Dec-08-2017].mkv


TV Series:
G:/Shows/n.lowerTrail().colon(' - ')} ({y})/Season {s.pad(2)}/{n.colon(' - ').lowerTrail()}.{y}.{s00e00}.{t.colon(' - ').lowerTrail()}.[{airdate.format('MMM-dd-yyyy')}]
Example:
G:/Shows/How I Met Your Mother (2005)/Season 01/How I Met Your Mother.2005.S01E01.Pilot.[Sep-19-2005].mkv


Anime (I keep my anime in the same directory as my series, because I have them in the same category on Plex.. just easier that way :D ):
G:/Shows/n.lowerTrail().colon(' - ')} ({y})/Season {s.pad(2)}/{n.colon(' - ').lowerTrail()}.{y}.{s00e00}.#{absolute.pad(4)}.{t.colon(' - ').lowerTrail()}.[{airdate.format('MMM-dd-yyyy')}]
Example:
G:/Shows/My Hero Academia (2016)/Season 01/My Hero Academia.2016.S01E01.#0001.Izuku Midoriya Origin.{Apr-03-2016].mkv


As you can see, I like having the series name in the filename itself because I'm weird haha.

Also, the only real difference between TV Series and Anime is that the Anime expression has an added "absolute" numbering added to the filename. I like knowing the episode number, and the S00E00 is for plex :)
I also added a pad of 4 to the absolute numbering, because One Piece is getting up there almost to 1000 episodes, so I just went ahead and made all of the anime absolute numbering with a pad of 4 :)

Anyway, hope this helped some of y'all! :)

Re: How about sharing our format expressions?

Posted: 27 Apr 2019, 17:02
by snaporaz
I have a simple renaming scheme to organize movies in folders. It distinguishes english names and "foreign" latin and non-latin names:

Code: Select all

{y}/{primaryTitle}{if (n != primaryTitle) {primaryTitle.isLatin() ? " (${n})" : " (${primaryTitle.ascii()}) (${n})"}}/{fn}
Like this:

1993/Short Cuts/Short Cuts.1993.720p.BluRay.AVC-mfcorrea.mkv

1997/Abre los ojos (Open Your Eyes)/Open.Your.Eyes.1997.BluRay.720p.x264.AC3-CMCT.mkv

2018/万引き家族 (wan yinki jia zu) (Shoplifters)/shoplifters.2018.limited.720p.bluray.x264-cadaver.mkv



The only trouble is the non-standard transliteration from non-latin names...
but I can't find an automatic way of applying a correct identifier in String.transliterate(identifier) based on the correct language.

Re: How about sharing our format expressions?

Posted: 06 Jun 2019, 07:48
by devster
Just an update on formats I'm using, you can now find them here: https://github.com/devster31/filebot-scripts
It includes movie, series, and anime formats as being currently used, however it also has a very small script which can generate them from mustache templates and partials written in javascript, a qBittorrent and transmission post-processing script (in bash and WIP in python), and a few other junk scripts (mostly useless).
Enjoy.