IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> multivalue tags for foobar2000 with discogs script
pone
post Nov 28 2009, 07:27
Post #1


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



I have a problem at writing a script with multivalue tags for foobar2000.

Multivalue tags have to be seperated with "\\" in mp3tag and are read as "; " in foobar.
My Goal is to transform the ", " at Genre & Style at discogs.com into "\\" in mp3tag and "; " in foobar.

I tried this with two different regexpreplace commands, but both had the same problem:
- the script runs well, mp3 tag shows "\\"
- but foobar shows also "\\" instead of "; " as it is supposed to do. it doesn't recognize the multivalue tag. instead it shows one genre tag like this "GenreA\\GerneB".
- only after saving the mp3 again in mp3tag without any changes, foobar shows "; " correctly and recognizes the multivalue tag.

My two regexpreplace commands that worked so far where the following:
CODE
regexpreplace ", " "\\\\\\"    
regexpreplace ", " "\\\\\\\\"

Any idea where the problem lies? Is it my script or is it a problem of mp3tag? Are there any working scripts with multivalue tag?

Now, I know "\" has a special function in mp3tag script language, so i tried with different repetitions of that sign, here are the results:
\ -> error message
\\ -> \
\\\ -> errror message
\\\\ -> \
\\\\\ -> errror message
\\\\\\ -> \\
\\\\\\\ -> error message
\\\\\\\\ - > \\
\\\\\\\\\ -> error message
\\\\\\\\\\ -> \\\

My script can be seen here:
http://forums.mp3tag.de/index.php?showtopi...ost&p=42303
Don't get confused by all the comment on the right side. I made them in respect to dano and his original script and documented every little change I made. The problem is in line 146.
(I changed only the seperator within discogs styles so far, of course the seperators between discogs style and discogs genre and within discogs genre will follow when it works. They are now seperatad by "; ")

I also read this similar problem of another user, but I don't think it is the same issue because in my case the tag is correctly recognized after another saving:
http://forums.mp3tag.de/index.php?showtopic=9412

I use mp3tag v.45a and foobar2000 v0.9.6.9 (both newest)
The discogs release I experimentated with was this http://www.discogs.com/release/22313 (but I don't think that makes a difference)

This post has been edited by pone: Nov 28 2009, 07:43
Go to the top of the page
 
+Quote Post
dano
post Nov 28 2009, 10:27
Post #2


Moderator


Group: Moderators
Posts: 5679
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.61d



It's currently not possible without additional "Save tag"

I suggest
replace ", " "\\\\"
...doesn't look that extreme.


--------------------
Go to the top of the page
 
+Quote Post
DetlevD
post Nov 28 2009, 11:49
Post #3


Member


Group: Full Members
Posts: 4787
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.61d



QUOTE (pone @ Nov 28 2009, 07:27) *
... only after saving the mp3 again in mp3tag without any changes, foobar shows "; " correctly and recognizes the multivalue tag. ...

Without reading further on ... this is the right way.

Mp3tag uses the "\\" and foobar uses the "; " as a replacement just for displaying the binary separator for multiple values which otherwise cannot be shown to the user.

In the moment when a user writes a string "\\" into a Mp3tag field this string means nothing more than the string "\\" itself. In the moment when the complete tag is written to the file Mp3tag uses ID3 standard rules and converts this placeholder into the correct binary representation.

Other ID3 conform applications can read such binary values and use their own replacement character or string for displaying the mutiple values at the screen.

DD.20091128.1148.CET


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
pone
post Nov 29 2009, 03:31
Post #4


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



QUOTE (dano @ Nov 28 2009, 10:27) *
It's currently not possible without additional "Save tag"

OK, so I have to stick with an additional saving which is not such a big problem.
Would be nice if mp3tag could be changed in such a way that the script itself recognizes "\\" (or any other symbol) as the placeholder for the binary separator of multiple value tags.
QUOTE
I suggest
replace ", " "\\\\"
...doesn't look that extreme.

This works, thanks. Although I don't understand why
replace ", " "\\\\"
and
regexpreplace ", " "\\\\"

result in different output.

Thank you dano & DetlevD for you fast answers, very appreciated.

This post has been edited by pone: Nov 29 2009, 03:31
Go to the top of the page
 
+Quote Post
dano
post Nov 29 2009, 19:37
Post #5


Moderator


Group: Moderators
Posts: 5679
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.61d



You could add a feature request for that.

In the web sources syntax, \ is used to escape i.e. "
This combines with the usual function of \ at regular expressions.


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd July 2014 - 08:39