Problems checking the length of a tag

W

wilte01

Guest
I am developing a script to set the ‘genre’ field based on the values of 4 user-defined tags, called ‘titlegenre’, artistgenre’, ‘albumgenre’ and ‘albumartistgenre’.

The values of the above fields are set via MusicBee, accessing rateyourmusic.com

What I want to do is set the ‘genre’ in the following order

‘albumartistgenre’ - highest
‘artist’
‘album’
‘title’ - lowest

To decide which to use, I planned on checking the length of each field to establish which is set. The code I have as an example is as follows

Code:
$if($gt($lenmulti(%artistgenre%),0,auto),$set_a(ARTLEN,1),$set_a(ARTLEN,0))

The above always returns ‘ARTLEN’ = 0

I can see that the ‘artistgenre’ has values by running the View Script Variables, whch shows the following

ARTISTGENRE [‘Baroque Pop’, ‘Beat’, ‘Bubblegum’, ‘Merseybeat’, ‘Pop’, ‘Pop Rock’]

I’m probably doing something really stupid! Any ideas and suggestions gratefully received

4 posts - 2 participants

Read full topic

Continue reading...
 
Top