Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //__1ST_PART_:__%ARTIST%__ ↓ block III begin ↓
- $if2($ascii($stripprefix($replace(
- //↓ block II begin ↓
- $if($or($strcmp($right(
- //↓ block I begin & BLOCK I CORE ↓ -gets original %artist% variable- -following strings are triggers for cut till the end-
- $put(ArtistBezFeat,$trim($cut(%artist%,$if2($strstr($replace(%artist%,
- ' featuring ',$char(65532),
- ' feat.',$char(65532),
- ' ft.',$char(65532)
- ),$char(65532)),255))))
- //↑ block I end ↑ ↓ BLOCK II CORE ↓ -gets %artist% from block I- -string must be in the end of %artist%, then it's deleted-
- ,5),', The'),
- $strcmp($right($get(ArtistBezFeat),5),', Les'),
- $strcmp($right($get(ArtistBezFeat),5),', Los'),
- $strcmp($right($get(ArtistBezFeat),5),', Der'),
- $strcmp($right($get(ArtistBezFeat),5),', Die'),
- $strcmp($right($get(ArtistBezFeat),5),', Das')
- ),$cut($get(ArtistBezFeat),$sub($len($get(ArtistBezFeat)),5)),$if($or(
- $strcmp($right($get(ArtistBezFeat),4),', dj'),
- $strcmp($right($get(ArtistBezFeat),4),', mc'),
- $strcmp($right($get(ArtistBezFeat),4),', El'),
- $strcmp($right($get(ArtistBezFeat),4),', Le'),
- $strcmp($right($get(ArtistBezFeat),4),', La')
- ),$cut($get(ArtistBezFeat),$sub($len($get(ArtistBezFeat)),4)),$if(
- $strcmp($right($get(ArtistBezFeat),3),', A')
- ,$cut($get(ArtistBezFeat),$sub($len($get(ArtistBezFeat)),3)),
- $get(ArtistBezFeat)))),
- //↑ block II end ↑ ↓ BLOCK III CORE ↓ -gets %artist% from block II- -replaces string present anywhere in the field-
- ' and ',' & ',
- ' meets ',' & ',
- ' with ',' & ',
- +,&,
- ' vs.',' &',
- ' vs ',' & ',
- ' presents ',' > ',
- ' pres.',' >',
- ' ps.',' >',
- ', The ',' ',
- '& The ','& ',
- 'vs. The ','& ',
- ', A ',' ',
- ', dj ',' ',
- ', mc ',' ',
- ' dj ',' ',
- ' mc ',' ',
- .,
- ),
- //strings trimmed in the beginning of the field; removes "The" and "A" if empty
- The,A,dj,mc,Les,Los,Der,Die,Das,El,Le,La)
- //default text for music files without %artist%
- ),UNKNOWN ARTIST)
- //↑ block III end ↑
- |
- //__2ND_PART_:__[%DATE%]_%ALBUM%__
- [
- //_%DATE%_ uses year found in %copyright% or %comment% if the year is latter than year in %date%
- ['['$trim($ifgreater(
- $put(cpYear,$longest(
- $num($stripprefix($meta(copyright),lbl:,'(est.)','lbl (est.):'),0),
- $num($stripprefix($meta(comment),lbl:,date:,plc:),0)
- )),
- $year(%date%),
- $get(cpYear),
- %date%
- ))']' ]
- //_%ALBUM%_
- [%album%]|]
- //__3RD_PART_:__%TRACKNUMBER%._%TITLE%__
- [%tracknumber%. ]%title%
Advertisement
Add Comment
Please, Sign In to add comment