Hi - I’m new to this so please don’t assume anything is too obvious to check!
I’m trying add to the genre tag but am not having any success. My goal is to inspect an element in the metadata, and use that to conditionally alter the genre tag. As an example; if I had an existing genre of ‘Rock’, I would want to run the below script to get a results that reads ‘Rock; Soundtrack’.
$if($and($in(%releasetype%, soundtrack), $not($in(%genre%, Soundtrack))),$set(genre, %genre%; Soundtrack))
Whenever I run this script I end up with the result in genre being:
With any previously entered values being erased.
A similar script I’ve used which does work is:
$if($and($in(%releasetype%, soundtrack), $not($in(%album%, [Soundtrack]))),$set(album, %album% [Soundtrack]))
The above will transform ‘The Piano’ to ‘The Piano [Soundtrack]’.
I’ve tried to do some troubleshooting and identified the following:
- If I set genre as a protected tag I get the desired result when I run the script manually
- $set(genre, %genre%) always returns nothing
- $set(test, %genre%) creates an empty tag
Some files are wma, with these files I seem to encounter another issue. If I $set(test, randomdata) no new tag field is created, but with other file types it is. Is this related?
- $copy/copymerge(test, %genre%) does not create a tag called ‘test’ regardless of file type
What am I not understanding here? Thanks!