Getting Traktor to see Foobar Ratings


#1

Hello, I'm having trouble getting traktor to see my foobar ratings.

I am trying to use this code that I found on the forum:

$if($eql(%RATING%,5),traktor@native-instruments.de|255|0,
$if($eql(%RATING%,4),traktor@native-instruments.de|204|0,
$if($eql(%RATING%,3),traktor@native-instruments.de|153|0,
$if($eql(%RATING%,2),traktor@native-instruments.de|102|0,
$if($eql(%RATING%,1),traktor@native-instruments.de|51|0,)))))

To write %popularimeter% value based on what I have rated in foobar (to the %rating% value)

I can't get this to work for whatever reason, but the code looks like it should work... maybe I am inputting the script in the wrong place (I am a complete newb to mp3tag)

I am selecting all the files who I want to write the tag for, going to extended tags -> popularimeter -> putting this script in for the value

It is outputting 0's, and in some cases it just outputs the code I wrote

can someone help me?


#2

It's the wrong place. You must use it with a Format value action:
/t/967/1


#3

ah thanks, for the record I tried that but it works now

Apparently when I copy pasted the script it cut it off though since the field was small, I don't know if that is a bug or something you want to look into.


#4

If you cut and paste more than one line from a text file or from a web page like this forum page, it likely can happen, that each line is delimited by an invisible EndOfLine character (CarriageReturn with ASCII value=13, LineFeed with ASCII value=10, or a sequence of both control characters).

A standard single line text input field cannot accept more than one line, but a standard multi line text input field can do so.

Having a multiline text on the Clipboard and pasting it into a single line input field will give only the first line of the multi line text. This is well known standard in user interface behaviour since such GUI techniques have been developed.

To get the content of the following three lines ...
A
B
C
... into one line, you have to unwrap them into one continously line ...
ABC
... before putting the line content to the Clipboard.

There ar many ways to do so ... one easy way is to open a simple Notepad editor window and put the multi line text in there, then unwrap all the lines into line 1 by a repeated sequence of pressing keys.
Start with [Ctrl+Home], then repeat [End][Del] until there is only one line.
Then copy this one line entirely to the Clipboard and paste it into a single line input field of a Mp3tag action dialog.

Be aware of, that this forum's web page reduces mutiple space characters in sequence to one space character, and often displays text not as intentioned.
Be aware of, that a simple space character, inserted or removed, in a Mp3tag scripting expression can lead to malfunction of the entire expression.
You always have to check for yourself whether a published scripting expression follows the syntax description and is valid or not.

DD.20110220.1033.CET


#5

That's why you should use code or codebox tags

$if($eql(%RATING%,5),traktor@native-instruments.de|255|0,$if($eql(%RATING%,4),traktor@native-instruments.de|204|0,$if($eql(%RATING%,3),traktor@native-instruments.de|153|0,$if($eql(%RATING%,2),traktor@native-instruments.de|102|0,$if($eql(%RATING%,1),traktor@native-instruments.de|51|0,)))))

#6

Hey thanks a lot for the explanation, I'm an experienced programmer I just didn't know much about the foobar/mp3tag code.

I looked it up and recognized that the code I had should have been working, which is why I posted here in the first place.

Thanks for clearing up the copy paste though, I didn't even think to try to put in the longer code at first because I assumed the field box had a character limit and I had exceeded it

I am a big fan of this software and the support is apparently great as well