Tigermess

foobar2000 media library view "by artist" -full

Nov 7th, 2011
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //__1ST_PART_:__%ARTIST%__  ↓ block III begin ↓
  2. $if2($ascii($stripprefix($replace(
  3. //↓ block II begin ↓
  4. $if($or($strcmp($right(
  5. //↓ block I begin & BLOCK I CORE ↓ -gets original %artist% variable-  -following strings are triggers for cut till the end-
  6. $put(ArtistBezFeat,$trim($cut(%artist%,$if2($strstr($replace(%artist%,
  7. ' featuring ',$char(65532),
  8. ' feat.',$char(65532),
  9. ' ft.',$char(65532)
  10. ),$char(65532)),255))))
  11. //↑ block I end ↑  ↓ BLOCK II CORE ↓ -gets %artist% from block I-  -string must be in the end of %artist%, then it's deleted-
  12. ,5),', The'),
  13. $strcmp($right($get(ArtistBezFeat),5),', Les'),
  14. $strcmp($right($get(ArtistBezFeat),5),', Los'),
  15. $strcmp($right($get(ArtistBezFeat),5),', Der'),
  16. $strcmp($right($get(ArtistBezFeat),5),', Die'),
  17. $strcmp($right($get(ArtistBezFeat),5),', Das')
  18. ),$cut($get(ArtistBezFeat),$sub($len($get(ArtistBezFeat)),5)),$if($or(
  19. $strcmp($right($get(ArtistBezFeat),4),', dj'),
  20. $strcmp($right($get(ArtistBezFeat),4),', mc'),
  21. $strcmp($right($get(ArtistBezFeat),4),', El'),
  22. $strcmp($right($get(ArtistBezFeat),4),', Le'),
  23. $strcmp($right($get(ArtistBezFeat),4),', La')
  24. ),$cut($get(ArtistBezFeat),$sub($len($get(ArtistBezFeat)),4)),$if(
  25. $strcmp($right($get(ArtistBezFeat),3),', A')
  26. ,$cut($get(ArtistBezFeat),$sub($len($get(ArtistBezFeat)),3)),
  27. $get(ArtistBezFeat)))),
  28. //↑ block II end ↑  ↓ BLOCK III CORE ↓ -gets %artist% from block II-  -replaces string present anywhere in the field-
  29. ' and ',' & ',
  30. ' meets ',' & ',
  31. ' with ',' & ',
  32. +,&,
  33. ' vs.',' &',
  34. ' vs ',' & ',
  35. ' presents ',' > ',
  36. ' pres.',' >',
  37. ' ps.',' >',
  38. ', The ',' ',
  39. '& The ','& ',
  40. 'vs. The ','& ',
  41. ', A ',' ',
  42. ', dj ',' ',
  43. ', mc ',' ',
  44. ' dj ',' ',
  45. ' mc ',' ',
  46. .,
  47. ),
  48. //strings trimmed in the beginning of the field; removes "The" and "A" if empty
  49. The,A,dj,mc,Les,Los,Der,Die,Das,El,Le,La)
  50. //default text for music files without %artist%
  51. ),UNKNOWN ARTIST)
  52. //↑ block III end ↑
  53. |
  54. //__2ND_PART_:__[%DATE%]_%ALBUM%__
  55. [
  56. //_%DATE%_ uses year found in %copyright% or %comment% if the year is latter than year in %date%
  57. ['['$trim($ifgreater(
  58.  $put(cpYear,$longest(
  59.   $num($stripprefix($meta(copyright),lbl:,'(est.)','lbl (est.):'),0),
  60.   $num($stripprefix($meta(comment),lbl:,date:,plc:),0)
  61.  )),
  62.  $year(%date%),
  63.  $get(cpYear),
  64.  %date%
  65. ))']' ]
  66. //_%ALBUM%_
  67. [%album%]|]
  68. //__3RD_PART_:__%TRACKNUMBER%._%TITLE%__
  69. [%tracknumber%. ]%title%
  70.  
Advertisement
Add Comment
Please, Sign In to add comment