Skip to content

Commit

Permalink
musikr: ignore genre numbers of 255
Browse files Browse the repository at this point in the history
  • Loading branch information
OxygenCobalt committed Jan 9, 2025
1 parent 9b82b5a commit 8bd89c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion musikr/src/main/cpp/JVMMetadataBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ void JVMMetadataBuilder::setId3v1(TagLib::ID3v1::Tag &tag) {
id3v2.add_id("TALB", tag.album());
id3v2.add_id("TRCK", std::to_string(tag.track()));
id3v2.add_id("TYER", std::to_string(tag.year()));
id3v2.add_id("TCON", std::to_string(tag.genreNumber()));
const int genreNumber = tag.genreNumber();
if (genreNumber != 255) {
id3v2.add_id("TCON", std::to_string(genreNumber));
}
}

void JVMMetadataBuilder::setId3v2(TagLib::ID3v2::Tag &tag) {
Expand Down

0 comments on commit 8bd89c5

Please sign in to comment.