Dear all,
yesterday some guys bailed me out with nice tricks (in German: /t/12805/1 to count the ARTIST fields given in a file (I'm talking about FLAC with Vorbis Comments).
Now, I managed to convert while exporting multivalue ARTIST fields to a nice list of featured artists with respect to a given ALBUM ARTIST (you might call the field ALBUMARTIST without space).
As an example, we start with a FLAC file containing
ALBUM ARTIST=2Pac
ARTIST=2Pac
ARTIST=Dr. Dre
ARTIST=Roger Troutman
The following export script
$filename($getenv('temp')\test.txt,utf-8)
$iflonger($meta(artist,1),0,$puts(l,$len((feat. $replace($meta_sep(artist,$char(7)),%album artist%,,))))$puts(cl,$strrchr((feat. $replace($meta_sep(artist,$char(7)),%album artist%,,)),$char(7)))$puts(cf,$strchr((feat. $replace($meta_sep(artist,$char(7)),%album artist%,,)),$char(7)))$if($eql($get(cl),$get(cf)),(feat. $replace($meta_sep(artist,$char(7)),%album artist%,,$char(7),)),$replace($regexp($cutRight((feat. $replace($meta_sep(artist,$char(7)),%album artist%,,)),$add($sub($get(l),$get(cl)),1)),($char(7))(.*),$2) & $cutLeft((feat. $replace($meta_sep(artist,$char(7)),%album artist%,,)),$get(cl)),$char(7),$char(44) )),)
will produce
.
For me, this is a great trick, however, there're more than 600 characters in a single line of the export script and if you want to avoid white space and line breaks in the output, the export script is hardly readable. (I don't know, how to include it nicely in the forum ...).
Feel free to use or improve it!
![]()


