Release Type - Compilation

scripting
Tags: #<Tag:0x00007fe3db058f40>

#1

welcome back
Is there a script that would remove the ‘‘album’’’ releasetype if it is a
compilation (album / compilation) and leave only the ‘‘compilation’’. Of course, if the ‘‘album’’ is the same.


#2

I would say that $if($in(%releasetype%,compilation),$set(%releasetype%,compilation)) should work, but scripts don’t seem to be working at all for me in Picard 1.4.2, so I can’t check if it works.


#3

This would also remove other release types (e.g., “live”), no? If @Zwanzig specifically wants “album” removed from the list, I guess it would need some more logic. Not sure how good Picard scripting is for dealing with specific parts of a list/array.


#4

List manipulation doesn’t seem particularly great in situ, but there is a very handy function to turn a (semi-)arbitrary string back into a list; we can use that to deal with the field as if it contained only a single value:

$if($inmulti(%releasetype%,compilation),$setmulti(releasetype,$replace(%releasetype%,album,)))

@Zwanzig, if you also wanted to get rid of ep and single when the release is marked as a compilation, this line is a bit more powerful:

$if($inmulti(%releasetype%,compilation),$setmulti(releasetype,$rreplace(%releasetype%,album|ep|single,)))

#5

OK it seems that it works :slight_smile:
The same can be used to remove ‘’ album ‘’ from ‘’ album / live ‘’.
Great thank you


#6

Hello again, I came up with something again :slight_smile:
The Mp3Tag Release Type writes to the ‘’ RELEASETYPE ‘’ tag in FLAC and mp3 files.
MB Picard - in FLAC files writes to ‘’ RELEASETYPE ‘’ and in mp3 files to ‘’ MUSICBRAINZ ALBUM TYPE ‘’.
Is it possible to save to one field - ‘‘RELEASETYPE’’ ??


#7

You can explicitly set ID3 tags. Try this (although I am not 100% sure I got the tag name right, never used this myself):

$set(_id3:TXXX:RELEASETYPE,%releasetype%)

#8

OK it works
Although the ‘’ MUSICBRAINZ ALBUM TYPE ‘’ tags are left, 'but Thank You

**