Multiple genres are not recognized by filters

You found a bug or have any issues? Please post them here!
User avatar
radio42
Site Admin
Posts: 9138
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Multiple genres are not recognized by filters

Post by radio42 »

Not all users use MP3 files and only MP3 resp. ID3v2 define multiple genres - other formats only support a single plain text string as one genre value and the editor of this single string might separate this string by its own!
The problem is, that I can not implement a totally specific handling just for ID3v2. I see the other way around as the correct way: generalize the multiple ID3v3 genres by flatten them to a single semicolon separated text string (btw, even your MusicBee tagger is doing this in his genre text display).
The same is by the way the case for many other ID3v3 tags which might contain multiple value, e.g. Artist, Composer, Lyricist etc.
This is design decision I once made and I want to keep it - even, if in your case I agree, that it would make your life easier, if I would change it. But I am sorry and I hope you understand this.

Another solution for you is, that you define your possible 'Genre' values mutual exclusive, so that a simple 'Contains' filter will work.
E.g. instead of using "Rock" and "Rock Ballades" you might use "Regular Rock" and "Rock Ballades" - or something similar.


However, I already found the issue with your files!
Your files are not correctly tagged according to the ID3v2.3 specs.
In ID3v2.3 any text information frames, if a textstring is followed by a termination ($00 (00)) all the following information should be ignored and not be displayed/used. (see here http://id3.org/id3v2.3.0)
This specific to ID3v2.3 (in ID3v2.4 all text frames are stored as a null separated list).

The problem with your files (ID3v2.3 and probably with MusicBee) is, that here the multiple genres are separated by $00 (00) - instead of a slash ('/') or by round brackets ('(genre1)(genre2)'). Thus the multiple genres are not correctly recognized and any 2nd or more value is ignored.

The Media Library Server uses (for speed and efficiency reasons) a slightly different tag reading lib, which is slightly more strict. That's the reason, why ProppFrexx can read your incorrect format, while the MLS ignores it!

So please ask MusicBee, if they can correct their software to correctly wirte multiple genres according to ID3v2.3.
Alternatively you might use the tag writing function of ProppFrexx.

Unfortunately I can not really see, that this is a bug or issue of ProppFrexx or the MLS !

However, I understand, that it is not really consistent and that the MLS and ProppFrexx should read TAGs equally, but that is something to improve in v4 effectively!
User avatar
hdradio
Posts: 625
Joined: 10 Apr 2012 17:36
Location: Crete, Hellas
Re: Multiple genres are not recognized by filters

Post by hdradio »

Bernd,
Thank you for the explanation.
I did some test this morning with musicbee, mediamonkey and mp3tag.
musicbee and mp3tag if a file has 2 genres, they create 2 TCON fields. They use the same method of storing the tag. I checked the bytes with 2 raw file tag viewers ("ID2 Raw Tag Viewer" and "MP3 Diags")
In musicbee if you type in genre: "rock; pop" (in mp3tag is: "rock\\pop") they create:
TCON: "rock"
TCON: "pop"
Both software use wrong method (a termination $00) of string.
So it is not possible to ask both (and any other I will find) to update their software. Because it will affect thousand of users and of course millions of files already tagged with that software.
On the other hand MediaMonkey creates a single field:
TCON: "rock; pop"
But it can read multiple TCON fields created by other software and convert it to "genre1; genre2; etc"

You say that other audio formats do no support multiple genres and users use the form "rock; pop" or any other delimiter they prefer instead of ";"
I see also that in cases of multiple TCON fields, PF substitutes them as "rock; pop"

What I would do if I were you as a developer.
1st: I would have an option in settings to define a custom delimiter instead of standard ";" a user might use.
2nd: I would separate those genres in my code into 2 different searchable fields. This is what all of the above software do.
That way, a simple: "genre EQUALS 'pop'" would give the wanted result.
Also I believe that no user will have to change their filter because the same filter will work in any case.

I believe that making things simple is a must for all.

Thank you for your time.
User avatar
hdradio
Posts: 625
Joined: 10 Apr 2012 17:36
Location: Crete, Hellas
Re: Multiple genres are not recognized by filters

Post by hdradio »

Bernd,
I am not blaming you for anything.
I am not asking you to do anything that is not compliant as PF already reads multiple tags from the above mentioned applications.
Uses would have to change their filters, just assume a user is having the following 2 tracks:
1. "Rock; Soft" and
2. "Rock"
So far EQUALS only matches the 1st entry. If I would change the EQUALS definition like you suggested, then track 1 and 2 would match - thus a different result, thus a breaking change. I hope you understand.
If 1. is both "Rock" & "Soft" then if ask for EQUALS "Rock" I think that it should match. ALL the music library software I know work like this.
Anyway. It's your software. You choose what to do. What I ask is my wish.
User avatar
radio42
Site Admin
Posts: 9138
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Multiple genres are not recognized by filters

Post by radio42 »

In the latest v4.0.1.6 the genre is now equally handled by the MLS as well as ProppFrexx (in the more relaxed way, so that even incorrect genre separators are recognized).
In addition does the 'MatchesAnyOf' filter now exactly do what you described under the Equals match.
User avatar
radio42
Site Admin
Posts: 9138
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Multiple genres are not recognized by filters

Post by radio42 »

Mp3Tag for example states this on their web site, that they are NOT ID3v2.3 compliant in this case!
I am sorry, but you can not expect, that I do it incorrectly just because others do it incorrectly as well. Please blame the others and not me!

But...
as already said above, in v4: I'll always correctly write ID3v2.3, but I'll be more flexible to read-in multiple genres which are separated by $00 (00). However, I'll not support multiple TCON values, as this is strictly against the ID3v2 rules!

So yes, I'll optimize things (as always), but these changes will be made in v4 only.
User avatar
radio42
Site Admin
Posts: 9138
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Multiple genres are not recognized by filters

Post by radio42 »

Uses would have to change their filters, just assume a user is having the following 2 tracks:
1. "Rock; Soft" and
2. "Rock"
So far EQUALS only matches the 1st entry. If I would change the EQUALS definition like you suggested, then track 1 and 2 would match - thus a different result, thus a breaking change. I hope you understand.
User avatar
hdradio
Posts: 625
Joined: 10 Apr 2012 17:36
Location: Crete, Hellas
Re: Multiple genres are not recognized by filters

Post by hdradio »

Thank you for the additions.
I am trying to update to v4.
Also in v4 (as I told you earlier) when I start a scan with MLS, PFOA can not find any files, or finds one or two. This happens on find dialog and in currently playing script. The IO system is fast enough and UI doesn't look to hang.
Maybe the database file (_synced_.pfp) starts empty and is getting filled again during scan ?
Can you please take a look ?
User avatar
radio42
Site Admin
Posts: 9138
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Multiple genres are not recognized by filters

Post by radio42 »

I'll take a look.
User avatar
hdradio
Posts: 625
Joined: 10 Apr 2012 17:36
Location: Crete, Hellas
Re: Multiple genres are not recognized by filters

Post by hdradio »

Can you also tell me where I can find "MatchesAnyOf" filter ? I can not find it in Visual Editor
User avatar
hdradio
Posts: 625
Joined: 10 Apr 2012 17:36
Location: Crete, Hellas
Re: Multiple genres are not recognized by filters

Post by hdradio »

Is it very difficult to add it to visual editor? Writing filters by hand except the difficulty can have syntax errors too.

The link you 've sent me writes:
There are two filter extension function, which can (currently) only be added in text mode only, which are:
and it was posted at 13 Apr 2012 17:33
Today is 2 Feb 2016.
"currently" 4 years later ?

Post Reply