08-26-2020, 07:50 PM
(This post was last modified: 08-26-2020, 08:07 PM by TheOldPresbyope.
Edit Reason: added a PPS
)
@Atair
In general, the subject of multiple genres is very controversial. (Ref: try "multiple genre tags" in your favorite search engine)
I don't believe this is a bug in moOde, per se.
If you go deeper in your testing, I believe that you'll find that MPD itself is schizophrenic about genre values. The trouble is routed in the awful hack invented to work around ID3's notion that every track is characterized by a single genre. Once ID3v2 changed the genre entry from an integer code to a string, folks got creative with stuffing the string with multiple genres separated by some user-defined delimiter such as semicolon ( ; ) or double reverse-solidus (\\).
It is provable that MPD still sees considers the string to be a single genre. Here's what I just did:
I downloaded a handy test collection of a sample music track variously in aac, aiff, flac, mp3, ogg, opus format. Using the correct metadata schema for each type, I tagged every track as genre="Electronic;Movie" because the track was synthesized for YouTube video creators (and I used it because it is explicitly in the Creative Commons).
Once I added these tracks to my SDCARD and updated the Library, I can see Electronic;Movie as one of the genres listed by moOde. I do not see separate "Electronic" or "Movie" entries and the command line query "mpc list genre" also returns only the concatenated "Electronic;Movie".
However, if I do what you did, "mpc search genre movie", then mpc returns the tracks.
Why? Apparently "mpc search" searches for the substring "movie" in the genre strings.
IMO, unless MPD itself splits the concatenated genre strings and returns the atomic values for moOde to use in its list of genres, moOde has no way to know what values it can search on.
HOWEVER!
You are in luck.You're tagging FLAC files. The FLAC specification says that their metadata shall be contained in Vorbis Comment blocks.
The Vorbis Comment block consists of a series of fields with name=value pairs. The spec doesn't prescribe names but there's is a gentleman's agreement to use common metadata names. The spec does say names can repeat in the block.
Hence, you can add multiple genre tags to a FLAC file without any hackery. Here is what metaflac reports for my test example FLAC file after I retagged it:
and mediainfo reports
Now comes the magic! The give away is this quote from the MPD user
When MPD scans my retagged file I now see both "Electronic" and "Movie" as tags in the list and I can select on either.
Done and dusted.
Regards,
Kent
PS - Now, of course, you have a different problem. You have to find a tag editor which will deal properly with the FLAC/Vorbis scheme rather than force it to look like a ID3 scheme.
PPS - [added later] The same ought to be true for OGG Vorbis and for Opus files too, since as far as I know they also use the Vorbis Comment metadata format but I don't have enough experience with these file types to be comfortable making pronouncements about them.
In general, the subject of multiple genres is very controversial. (Ref: try "multiple genre tags" in your favorite search engine)
I don't believe this is a bug in moOde, per se.
If you go deeper in your testing, I believe that you'll find that MPD itself is schizophrenic about genre values. The trouble is routed in the awful hack invented to work around ID3's notion that every track is characterized by a single genre. Once ID3v2 changed the genre entry from an integer code to a string, folks got creative with stuffing the string with multiple genres separated by some user-defined delimiter such as semicolon ( ; ) or double reverse-solidus (\\).
It is provable that MPD still sees considers the string to be a single genre. Here's what I just did:
I downloaded a handy test collection of a sample music track variously in aac, aiff, flac, mp3, ogg, opus format. Using the correct metadata schema for each type, I tagged every track as genre="Electronic;Movie" because the track was synthesized for YouTube video creators (and I used it because it is explicitly in the Creative Commons).
Once I added these tracks to my SDCARD and updated the Library, I can see Electronic;Movie as one of the genres listed by moOde. I do not see separate "Electronic" or "Movie" entries and the command line query "mpc list genre" also returns only the concatenated "Electronic;Movie".
However, if I do what you did, "mpc search genre movie", then mpc returns the tracks.
Why? Apparently "mpc search" searches for the substring "movie" in the genre strings.
IMO, unless MPD itself splits the concatenated genre strings and returns the atomic values for moOde to use in its list of genres, moOde has no way to know what values it can search on.
HOWEVER!
You are in luck.You're tagging FLAC files. The FLAC specification says that their metadata shall be contained in Vorbis Comment blocks.
The Vorbis Comment block consists of a series of fields with name=value pairs. The spec doesn't prescribe names but there's is a gentleman's agreement to use common metadata names. The spec does say names can repeat in the block.
Hence, you can add multiple genre tags to a FLAC file without any hackery. Here is what metaflac reports for my test example FLAC file after I retagged it:
Code:
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=Movie
and 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 / Movie
Description : docs.expressif.com
Recorded date : 2016
...
Now comes the magic! The give away is this quote from the MPD user
Quote:There can be multiple values for some of these tags. For example, MPD may return multiple lines with a performer tag.
When MPD scans my retagged file I now see both "Electronic" and "Movie" as tags in the list and I can select on either.
Done and dusted.
Regards,
Kent
PS - Now, of course, you have a different problem. You have to find a tag editor which will deal properly with the FLAC/Vorbis scheme rather than force it to look like a ID3 scheme.
PPS - [added later] The same ought to be true for OGG Vorbis and for Opus files too, since as far as I know they also use the Vorbis Comment metadata format but I don't have enough experience with these file types to be comfortable making pronouncements about them.