Skip to content

Commit

Permalink
fix(track): Remove deprecated `APE::Item::value() to fix TagLib 2.0 b…
Browse files Browse the repository at this point in the history
…uild

This fixes a build error with TagLib 2.0 while still being backwards
compatible with legacy TagLib 1.x versions. The `binaryData()` method
exists since TagLib 1.8 which was released almost 12 years ago
(September 6, 2012).
  • Loading branch information
Holzhaus committed Feb 9, 2024
1 parent d112e4c commit 1dd2ae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/track/taglib/trackmetadata_ape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ bool importCoverImageFromTag(QImage* pCoverArt, const TagLib::APE::Tag& tag) {
if (tag.itemListMap().contains("COVER ART (FRONT)")) {
const TagLib::ByteVector nullStringTerminator(1, 0);
TagLib::ByteVector item =
tag.itemListMap()["COVER ART (FRONT)"].value();
tag.itemListMap()["COVER ART (FRONT)"].binaryData();
int pos = item.find(nullStringTerminator); // skip the filename
if (++pos > 0) {
const TagLib::ByteVector data(item.mid(pos));
Expand Down

0 comments on commit 1dd2ae2

Please sign in to comment.