Issue Details (XML | Word | Printable)

Key: PICARD-147
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: voiceinsideyou
Reporter: voiceinsideyou
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Picard

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

Created: 19/Jan/12 05:11 PM   Updated: 13/Feb/12 01:37 AM   Resolved: 13/Feb/12 01:37 AM
Component/s: Scripting
Affects Version/s: 0.16
Fix Version/s: 1.0


 Description  « Hide

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 made changes - 19/Jan/12 05:12 PM
Field Original Value New Value
Assignee voiceinsideyou [ voiceinsideyou ]
voiceinsideyou made changes - 19/Jan/12 05:12 PM
Status Open [ 1 ] In Progress [ 3 ]
voiceinsideyou made changes - 21/Jan/12 03:45 AM
Status In Progress [ 3 ] Review Submitted [ 5 ]
Michael Wiencek made changes - 13/Feb/12 01:37 AM
Status Review Submitted [ 5 ] Closed [ 6 ]
Resolution Fixed [ 1 ]