Bug 437001 - Genre Folk/Rock is handeled wrong
Summary: Genre Folk/Rock is handeled wrong
Status: RESOLVED FIXED
Alias: None
Product: kid3
Classification: Applications
Component: general (other bugs)
Version First Reported In: 3.8.x
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Urs Fleisch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-12 22:31 UTC by Hedayat Vatankhah
Modified: 2021-05-19 15:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hedayat Vatankhah 2021-05-12 22:31:18 UTC
SUMMARY
(Forwarded from https://bugzilla.redhat.com/show_bug.cgi?id=1959235. I'm not sure if the given info is enough; let me know if I should ask anything from the reporter):

a) it's written in text instead number 81 in idv3
b) if it's correctly written by "id3v2 --genre 81 *.mp3" it's displayed a "Folk"
c) v1/v2/v3 have different behavior

in general always when it's written as text instead number it's plain wrong and many players especially on android have troubles
Comment 1 Urs Fleisch 2021-05-13 09:54:00 UTC
Thanks for the report. You discovered a bug, but the description is not accurate. Let me give an exact description of the bug:

1. When using TagLib < 1.12, the following genres cannot be set in ID3v1:
   Avant-Garde, Beat Music, Bebop, Britpop, Dancehall, Dark Wave, Euro House,
   Eurotechno, Fast Fusion, Folk Rock, Hip Hop, Jazz-Funk, Pop-Funk, Synth-Pop,
   Worldbeat.
   Possible workarounds:
   - Use a package which uses TagLib 1.12 (e.g. binary packages from
     kid3.kde.org or Flatpak)
   - Activate Id3libMetadata plugin to use id3lib instead of TagLib. However,
     this only works for tags which do not have an ID3v2.4.0 tag because this
     version is not supported by id3lib.

2. The following genres will have a wrong number in ID3v2 (the wrong genre is
   listed in parentheses):
   Fast Fusion (Folk), Folk (Folk Rock), Folk Rock (Folklore), Folklore
   (Freestyle), Funk (Fusion), Fusion (Fast Fusion)
   Workaround:
   - Use "Genre as text instead of numeric string" in the ID3v2 section of the
     Tags/Tag 2 tab in the preferences. This is also the default. However, when
     using multiple genres in an ID3v2.3.0 tag, only one of them can be non
     numeric.

I will fix this soon. Could you clarify some points of your report:

> a) it's written in text instead number 81 in idv3

You mean Id3v2? Writing the genre as text instead of a numeric string is not a bug, it is a feature of ID3v2. You can use numeric string by deactivating the option "Genre as text instead of numeric string" in the ID3v2 section of the Tags/Tag 2 tab in the preferences.

> b) if it's correctly written by "id3v2 --genre 81 *.mp3" it's displayed a "Folk"

Confirmed, this is bug 1 listed above.

> c) v1/v2/v3 have different behavior

These are different tag formats and therefore they will have different behavior. The genres should be the same however, when copied between the tags.

> in general always when it's written as text instead number it's plain wrong and many players especially on android have troubles

Using a text instead of a number is the recommended format for ID3v2.4.0 (see id3v2.4.0-frames.txt specification). ID3v2.3.0, however, recommends numerical strings with text refinements (id3v2.3.0.txt). The players I use on Linux do not seem to have problems with text genres in ID3v2.3. The players I use on Android do not show a genre (Music and Music Player Go from F-Droid). Which players do you know which have trouble?
Comment 2 Urs Fleisch 2021-05-13 10:11:18 UTC
Git commit ed5f2c49d50443b89c00de86c82ea82491601a9b by Urs Fleisch.
Committed on 13/05/2021 at 10:00.
Pushed by ufleisch into branch 'master'.

Fix wrong mapping of genres to genre numbers

When using TagLib < 1.12, the following genres cannot be set in ID3v1:
Avant-Garde, Beat Music, Bebop, Britpop, Dancehall, Dark Wave,
Euro House, Eurotechno, Fast Fusion, Folk Rock, Hip Hop, Jazz-Funk,
Pop-Funk, Synth-Pop, Worldbeat.

The following genres will have a wrong number in ID3v2:
Fast Fusion (Folk), Folk (Folk Rock), Folk Rock (Folklore),
Folklore (Freestyle), Funk (Fusion), Fusion (Fast Fusion)

This will fix the wrong mapping and support the old genre names used
by TagLib < 1.12.

M  +3    -3    src/core/tags/genres.cpp
M  +34   -0    src/plugins/taglibmetadata/taglibfile.cpp

https://invent.kde.org/multimedia/kid3/commit/ed5f2c49d50443b89c00de86c82ea82491601a9b
Comment 3 Urs Fleisch 2021-05-13 11:04:52 UTC
A development snapshot git20210513 is now available at https://sourceforge.net/projects/kid3/files/kid3/development/. Please check if the problem is solved.

By the way: I checked in my test data if there are other applications which write ID3v2.3.0 genres as text, and there are quite a few, e.g. aTunes, Banshee, Deadbeef, Gmusicbrowser, MP3Tag, MediaMonkey, Picard, Rhythmbox, SYLT editor, TagScanner. However, iTunes and Windows Media Player write numeric strings.
Comment 4 Hedayat Vatankhah 2021-05-19 13:59:25 UTC
Forwarded:

> You can use numeric string by deactivating the option "Genre as text instead of numeric string"

well, than it's a bug that this option enabled for whatever reason writes every genre i have numeric except Folk/Rock especially when the default is set to ID3v2.3.0

> The players I use on Android do not show a genre (Music and Music Player Go from F-Droid). Which players do you know which have trouble?

currently i am using "pi music player" which supports genre, otherwise it would be unusable for me because missing "take all hard rock tracks and play them random" :-)

in the past i tried different players including the builtin of Cyanogenmod/LineageOS which also supported genres and i hd random issues unless i fixed all files while i didn't even realize what exactly it changed, but i removed the tags completly, closed kid3 and wrote them from scratch which also solved some unicode issues with german umlauts

finally on my own database written in PHP i ensured that there is no non-numeric and no unknown genre tag, well and that's how i found out the complete wrong handling of Folr/Rock (Blackmore's Night as example) while i wonder how i managed get the existing tracks correct while years later (now) it was impoissble with kid3

P.S.: can you please add a button to open all folders abd subfolders, it took me hours last year to open all 4000 folders, select all tracks and mark unwanted tags to delete them :-)
Comment 5 Urs Fleisch 2021-05-19 15:12:07 UTC
Thanks for your explanations. What I would like to know from you is whether the fixed version solves the bug. So could you please download https://sourceforge.net/projects/kid3/files/kid3/development/kid3-git20210513-Linux.tgz, extract it somewhere and run the kid3-qt binary which is included in the extracted archive. You do not need to uninstall your current version for this and you could delete the extraced folder afterwards if you like. Make sure that "Genre as text instead of numeric string" is unchecked, and then it should create correct tags with "Folk Rock" genre.

> P.S.: can you please add a button to open all folders abd subfolders, it took
> me hours last year to open all 4000 folders, select all tracks and mark
> unwanted tags to delete them :-)

Just click the right mouse button in the file list and you have "Expand all" as the first action in the context menu. After all subfolders are expanded, you could use "Tools/Filter" to have only files with unwanted tags visible.