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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 0.16
    • Fix Version/s: 1.0
    • Component/s: Scripting
    • Labels:
      None

      Description

      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,#))
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: