Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Multiple Genres Bug?
#11
Quote:@Tim Curtis
The Library in moOde is designed assuming there is only one occurrence of a given tag.

Why? Most Media servers can deal with multiple genre values, even rather old ones like Twonky which I ran for a long time, but also Plex and Emby.
Also mpd works perfectly as you can prove with mpc. (And I thought the Moode player is using mpd as library under the hood and is working as an mpd client?)

Quote:This is the most common tagging scheme.

Inventing a decent genre categories scheme and tagging an existing library with a quite huge number of albums ist a big effort which probably a lot of people rather avoid.
The tags in tracks provided by record labels are often rubbish. In pop music with hundreds of flavors (and each week a new one) it makes TMHO little sense to spend the effort of genre tagging. Also, in the past, you could only select a value from an otherwise fixed list of genres. This alltogether probably established a (bad) habit what one might call a commen practice.
Reply
#12
@Atair

What your mediainfo output shows is consistent with what I get for my FLAC file but contradicts my previous experience with MP3 files. Unfortunately, mediainfo has already manipulated the actual tag contents. 

Could you please go an extra step, post your MP3 file on a filesharing site such DropBox or Google Drive, and send me a link by PM?  (I should have asked for it to begin with, sorry.)

---

The Kid3 docs were a good thought, but they don't tell me anything I don't already know about music metadata. The most valuable contribution is its Table 3.1. Mapping of Unified Frame Types to Various Formats. However, this table appears to be identical to the one published by MusicBrainz and similar tables published by others. 

More to the point, Kid3, like many of the tag editors I'm familiar with, manipulates metadata behind the scenes. For example, it takes my FLAC file with its correct two "GENRE=Electronic" and "GENRE=Music" fields and displays instead "Genre   Electronic;Music".  <rant>I intensely dislike software which does this</rant>.

The question for me remains, what specifically is contained in your ID3v2 tag which is allowing interpretation of multiple genre entries in a single string.

Oh, and Guten Tag!

---

Regards,
Kent
Reply
#13
@Atair you mentioned earlier that ...
"one track has GENRE: A;B;C, the next GENRE: B;C;A, and others maybe GENRE: C;B;A"

A quick look at the code and it's storing only the last genre in the ; separated list. For example:

track1 A;B;C
track2 A;B;C
track3 B;C;A
track4 A;C;B
track5 A;C;B
track6 A;C;B

Results in Tag view showing:

Genre A
- track3

Genre B
- track4
- track5
- track6

Genre C
- track1
- track2

I think this is what's happening in your case.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#14
@Tim Curtis

I misspoke before. It's painful making sure I start with a clean slate for each test.

Let's take my FLAC file.with its two consecutive GENRE entries

Code:
pi@moode3a:/mnt/SDCARD/FuriousFreak $ metaflac --list ff-16b-2c-44100hz.flac
METADATA block #0
...
METADATA block #1
 type: 4 (VORBIS_COMMENT)
 is last: false
 length: 198
 vendor string: Lavf56.40.101
 comments: 8
   comment[0]: TITLE=Furious Freak-FLAC
   comment[1]: ARTIST=Kevin MacLeod
   comment[2]: ALBUM=Incompetech.com
   comment[3]: DATE=2016
   comment[4]: TRACKNUMBER=02
   comment[5]: DESCRIPTION=docs.expressif.com
   comment[6]: GENRE=Electronic
   comment[7]: GENRE=Music


For this, mediainfo reports

Code:
pi@moode3a:/mnt/SDCARD/FuriousFreak $ mediainfo ff-16b-2c-44100hz.flac
General
Complete name                            : ff-16b-2c-44100hz.flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
File size                                : 21.4 MiB
Duration                                 : 3 min 7 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 958 kb/s
Album                                    : Incompetech.com
Track name                               : Furious Freak-FLAC
Track name/Position                      : 02
Performer                                : Kevin MacLeod
Genre                                    : Electronic / Music
Description                              : docs.expressif.com
Recorded date                            : 2016

After updating the Library

Code:
pi@moode3a:/mnt/SDCARD/FuriousFreak $ mpc list genre
Electronic
Music
Utilities

But, the moOde Library/Tag view lists only

Code:
Music
Utilities

which I think is consistent with what you have posted previously. I was misled in my earlier post by the fact that Electronic was already in the tag list from another, single-genre file.

And, of course, "Electronic;Music" gets added to the tag list after updating if I've added my MP3 file with its concatenated genre entry.

Regards,
Kent
Reply
#15
PM me a dl link to your test flac file and I'll add some debug to the lib generator to dump the flat list.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#16
(08-27-2020, 08:02 AM)Atair Wrote:
Quote:@Tim Curtis
The Library in moOde is designed assuming there is only one occurrence of a given tag.

Why? Most Media servers can deal with multiple genre values, even rather old ones like Twonky which I ran for a long time, but also Plex and Emby.
Also mpd works perfectly as you can prove with mpc. (And I thought the Moode player is using mpd as library under the hood and is working as an mpd client?)

Quote:This is the most common tagging scheme.

Inventing a decent genre categories scheme and tagging an existing library with a quite huge number of albums ist a big effort which probably a lot of people rather avoid.
The tags in tracks provided by record labels are often rubbish. In pop music with hundreds of flavors (and each week a new one) it makes TMHO little sense to spend the effort of genre tagging. Also, in the past, you could only select a value from an otherwise fixed list of genres. This alltogether probably established a (bad) habit what one might call a commen practice.

1. Why the single Genre scheme? Because, at least based on the lack of Forum posts complaining about it, it appears to be working just fine for moOde users.

2. The Library in moOde does not use on-demand MPD search queries to generate the data, it's based on a server-side filtering routine that generates a Genre/Artist/Album/Track array thats loaded entirely into the Browser's memory. This allows Tag and Album view to avoid round trips to the server to get data and as a result be very responsive for most collections.

3. My experience has been that (a) the top ripping and tagging utilities do a good job, and (b) most audio enthusiasts soend a lot of time tagging their collections.

If there is more demand for breaking out multiple genres then I'd add it to the TODO list.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#17
Quote:2. The Library in moOde does not use on-demand MPD search queries to generate the data, it's based on a server-side filtering routine that generates a Genre/Artist/Album/Track array thats loaded entirely into the Browser's memory. This allows Tag and Album view to avoid round trips to the server to get data and as a result be very responsive for most collections.

Yes, I remember. You told me already in another thread.
But mpd holds the complete and correct info. So why should it not be possible to retrieve the complete info when generating the HTML/XML code?

Quote:If there is more demand for breaking out multiple genres then I'd add it to the TODO list.

Sounds rather disapppointing. Why falling behind what is standard in most  media servers?
Reply
#18
@Atair

I can't predict how this discussion will impact future moOde capability but at least I understand better now what's going on with your files. (Thanks for sending the link; I got all that I need. I know I was supposed just to look at the metadata but I couldn't help listening too Angel )

Here's what is actually in the metadata for one of your MP3 files

Code:
kreed@T520:~/Atair$ mid3v2 '01 - Dune Mosse - Zucchero & Miles Davis.mp3'
IDv2 tag info for 01 - Dune Mosse - Zucchero & Miles Davis.mp3
APIC=cover front,  (image/jpeg, 34278 bytes)
COMM==XXX=CD Comp
COMM=ID3v1 Comment=eng=CD Comp
GEOB=[unrepresentable data]
TALB=Zu & Co.
TCON=Rock-Italienisch / Italien / Rock
TDRC=2004
TIT2=Dune Mosse
TPE1=Zucchero
TPE2=Zucchero
TPUB=Polydor (Universal)
TRCK=1
TYER=2004

As you can see, the TCON value (which is short for "Text: Content Type" and is interpreted universally to mean "Genre") contains three genres separated by space-solidus-space. I now have an idea what to test with ID3v2 tags. Incidentally, this parsing of the concatenated values is not documented in the MPD User Manual nor can I figure out where it is happening in the C++ code.

The FLAC file is less mysterious.
Code:
pi@moode3a:/mnt/SDCARD/Atair $ metaflac --list 01-01-Richard_Galliano-A_French_Touch-LLS.flac
...
METADATA block #2
 type: 4 (VORBIS_COMMENT)
 is last: false
 length: 432
 vendor string:
 comments: 15
   comment[0]: ALBUM=New Jazz Musette
   comment[1]: TITLE=A French Touch
   comment[2]: TRACKNUMBER=1
   comment[3]: TRACKTOTAL=9
   comment[4]: DISCNUMBER=1
   comment[5]: DISCTOTAL=2
   comment[6]: DATE=2019
   comment[7]: COPYRIGHT=2016 Ponderosa Music & Art
   comment[8]: GENRE=Jazz
   comment[9]: ALBUMARTIST=Richard Galliano
   comment[10]: ARTIST=Richard Galliano
   comment[11]: DESCRIPTION=Interprètes : Richard Galliano, Composer, Performer, Writer
Label : Ponderosa Music & Art Srl - Believe

   comment[12]: genre=Jazz-Akkordeon
   comment[13]: genre=Musette
   comment[14]: genre=Frankreich
...

Although the comment lines 12-14 should be named GENRE rather than genre, at least this file's metadata agrees with my previous statement regarding multiple genres.

Regards,
Kent
Reply
#19
(08-27-2020, 05:37 PM)Atair Wrote:
Quote:2. The Library in moOde does not use on-demand MPD search queries to generate the data, it's based on a server-side filtering routine that generates a Genre/Artist/Album/Track array thats loaded entirely into the Browser's memory. This allows Tag and Album view to avoid round trips to the server to get data and as a result be very responsive for most collections.

Yes, I remember. You told me already in another thread.
But mpd holds the complete and correct info. So why should it not be possible to retrieve the complete info when generating the HTML/XML code?

Quote:If there is more demand for breaking out multiple genres then I'd add it to the TODO list.

Sounds rather disapppointing. Why falling behind what is standard in most  media servers?

Because we have chosen to implement the Library in a particular way that uses only a single instance of each tag which works well for the majority of moOde users. Modifying it would prolly be a substantial work effort and given the lack of demand for multiple genres or multiple other tags there is no justification for spending time on it but its always possible that another developer will be interested in working on it and contributing the feature.

You should look at the sources to understand how the Library is generated. https://github.com/moode-player/moode.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#20
I started analyzing the code to a certain extent and tried to track down the issue, although I am not really familiar with php.

In libcache.json each track only has one single genre:value pair.

The flat data are generated in playerlib.php within the genLibrary function:
PHP Code:
    foreach ($flat as $flatData) {
        
$songData = array(
            
'file' => $flatData['file'],
            
'tracknum' => ($flatData['Track'] ? $flatData['Track'] : ''),
            
'title' => ($flatData['Title'] ? $flatData['Title'] : 'Unknown Title'),
            
'disc' => ($flatData['Disc'] ? $flatData['Disc'] : '1'),
            
'artist' => ($flatData['Artist'] ? $flatData['Artist'] : 'Unknown Artist'),
            
'album_artist' => $flatData['AlbumArtist'],
            
'composer' => ($flatData['Composer'] ? $flatData['Composer'] : 'Composer tag missing'),
            
'year' => getTrackYear($flatData),
            
'time' => $flatData['Time'],
            
'album' => ($flatData['Album'] ? $flatData['Album'] : 'Unknown Album'),
            
'genre' => ($flatData['Genre'] ? $flatData['Genre'] : 'Unknown'),
            
'time_mmss' => songTime($flatData['Time']),
            
'last_modified' => $flatData['Last-Modified'],
            
'encoded_at' => getEncodedAt($flatData'default'true)
        ); 


Genre is only mapped once. But I assume that listallinfo delivers multiple genre:value pairs.
So the problem probably already occurs in genFlatList(), because the tags from a listallinfo record are mapped into an array $flat with the tag names as keys. If more tags with the same name occur in a record, only the last occurrence will be finally kept in the array due to the uniqueness of keys.

On the other hand, when selecting "track info" for a single file in the GUI, all genres are listed. Obviously mpd is queried here directly and not the Moode lib.
Reply


Forum Jump: