Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Trunc(str, len):=$repl(%str%, ".{" $len($repl(%str%, "(.?){" %len% "}$", "")) "}$", "")
- TruncEllipse(str, len):= { $len(%str%) = $len($Trunc(%str%, %len%)) ? %str% : $Trunc(%str%, %len%) "…" }
- #AT:= { %ATe% ? %ATe% " (" %ATr% ")" : %ATr% } #anime title english for romanji
- AT:= { %ATe% ? %ATe% "" : %ATr% }
- ET:=[%ETe%,%ETr%]
- ET:=$TruncEllipse(%ET%,"64")
- GT:="[" [%GTs%,%GTl%] "]"
- CRC:="["$uc(%FCrc%)"]"
- Src:="["%Source%"]" #set [source] e.g. [Blu-ray]
- Ver:={%Ver%="1"?"":"v"%Ver%} #set version if appliccable
- Res:="["%FVideoRes%"]" #set resolution e.g. [1280x720]
- Codec:="["$repl(%FVCodec%,"H264/AVC","h264")"]" #set video codec
- TmpPad:=$max($len(%EpHiNo%),$len(%EpCount%)) # set minimum. There HAS to be an easier way but i stupid.
- EpNoPad:=$pad(%EpNo%,$max(%TmpPad%,'2'), "0")
- EpNoPad:=$repl(%EpNoPad%,'[sS]',"S00E0") #rename to "S00E"
- MEpNo:={%ET%="Complete Movie"?%EpNoPad% %Ver%:%EpNoPad% %Ver%" - "%ET%} #Only show title when not "Complete Movie"
- Movie := %AT%" - "%MEpNo%" - "%GT%%Src%%Res%%Codec%%CRC% #for movies set to
- Other := %AT%" - "%EpNoPad%%Ver%" - "%ET%" - "%GT%%Src%%Res%%Codec%%CRC% #all else set to
- FileName:= {%Type% = "Movie"? %Movie% : %Other%} #check if the file is a movie or not and rename appropiately
- PathName:="E:\ProcessingAnime\" $repl(%AT%,'[\\":/*|<>?]',"")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement