Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-147

Allow multi-valued variables to be transformed in tagger script and then set back in tags as multi-valued

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Normal Normal
    • 1.0
    • 0.16
    • Scripting
    • None

      Currently it's not possible to take a multi-valued variable (%performer%, %composer%, %genre% are typical), transform it in tagger script, and then set it back as a multi-valued variable.

      e.g

      $set(genre,$lower(%genre%))
      

      Would convert [Electronica, Hip Hop] to "electronica; hip hop" in a tag.

      Propose a new function which will unpack a string to a list based on a splitting character; defaulting to the same string.

      $setmulti(tagname,value, separator = "; ")
      

      It's a bit hacky, but it'd be a major piece of work to make the scripting support lists internally (it all assumes text currently, which is very convenient) so this is a reasonable workaround to allow this kind of stuff.

      The above example would be done as

      $setmulti(genre,$lower(%genre%))
      

      Users could also use this to manually set multi-valued variables like

      $if($eq(%artist%,Metallica),$setmulti(genre,Metal#Thrash Metal,#))
      

            voiceinsideyou voiceinsideyou
            voiceinsideyou voiceinsideyou
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                1.0