See also: https://youtu.be/hSFv2kcC0lM
Was there ever a solution found to the original question?
i.e. How to make a particular Action Group do one thing for mp3 and another thing for FLAC.
This is necessary to edit ratings for Traktor, which for some annoying legacy reason stores the ratings as follows:
mp3 in field POPULARIMETER with format:
traktor@native-instruments.de|nnn|0
FLAC in field RATING WMP with format:
nnn
So the 2 different actions needed to set the rating are:
(mp3) Format value: "POPULARIMETER": traktor@native-instruments.de|nnn|0
(FLAC) Format value: "RATING WMP": nnn
But how to automatically perform the first action for mp3 and the second for FLAC?
Displaying the rating is easy enough. This is the Value expression I use to show 0 to 5 stars as set by Traktor, for both mp3 and FLAC:
$repeat($char(9734),$div($sub($if($eql($strstr(%popularimeter%,'traktor@native-instruments.de'),1),$regexp(%popularimeter%,'traktor@native-instruments\.de\|(\d{1,3})\|\d+',$1),%rating wmp%),$mod($regexp(%popularimeter%,'traktor@native-instruments\.de\|(\d{1,3})\|\d+',$1),51)),51))
I've figured out a way to do it...
e.g. to set rating = 3 stars
Here it is to copy & paste, to set rating 0,1,2,3,4 or 5
RATING WMP: $if($stricmp(%_tag_read%,'FLAC'),0,)
POPULARIMETER: $if($eql($strstr(%_tag_read%,'ID3'),1),traktor@native-instruments.de|0|0,)
RATING WMP: $if($stricmp(%_tag_read%,'FLAC'),51,)
POPULARIMETER: $if($eql($strstr(%_tag_read%,'ID3'),1),traktor@native-instruments.de|51|0,)
RATING WMP: $if($stricmp(%_tag_read%,'FLAC'),102,)
POPULARIMETER: $if($eql($strstr(%_tag_read%,'ID3'),1),traktor@native-instruments.de|102|0,)
RATING WMP: $if($stricmp(%_tag_read%,'FLAC'),153,)
POPULARIMETER: $if($eql($strstr(%_tag_read%,'ID3'),1),traktor@native-instruments.de|153|0,)
RATING WMP: $if($stricmp(%_tag_read%,'FLAC'),204,)
POPULARIMETER: $if($eql($strstr(%_tag_read%,'ID3'),1),traktor@native-instruments.de|204|0,)
RATING WMP: $if($stricmp(%_tag_read%,'FLAC'),255,)
POPULARIMETER: $if($eql($strstr(%_tag_read%,'ID3'),1),traktor@native-instruments.de|255|0,)
@seb303
Good catch!
But why do you need it?
In my last statement, I showed it was working by just using the same RATING WMP for both mp3 and flac files.
The moment you analyze within Traktor and close it, it automatically converts the RATING WMP to the traktor@native-instruments.de|nnn|0 value (when it's an mp3 file).
So I'm curious in which situation your approach is needed =)
@bascurtiz
My usage is that sometimes I may edit the rating in Traktor and sometimes I may edit the rating in Mp3tag and I want the change to work in both directions.
While Traktor will import the rating from various different fields, once it has set POPULARIMETER = traktor@native-instruments.de|nnn|0 (which it will do automatically), it will then ignore changes to other fields such as RATING WMP, and so edits in Mp3tag wouldn't update in Traktor.
I considered simply setting both fields in Mp3tag, but then if you update the rating in Traktor you will have 2 different ratings in the 2 fields, and then what should be displayed in Mp3tag?
So I thought it best to set the ratings in Mp3tag exactly as Traktor does it. The tag support in Traktor is finicky enough without adding more potential failure points!
Ahh I get it!
My approach is indeed a one-way-direction.
Yours will make it compatible using either one (mp3tag) or the other (Traktor) whenever you choose one, it will show the changes in both.
