Skip to content

Commit

Permalink
Fix compilation with latest TagLib git master
Browse files Browse the repository at this point in the history
The latest taglib `RIFF::WAV::File::tag` now returns `TagLib::Tag *`
instead of `ID3v2::Tag *`. The old behaviour was kept only for backwards
compatibility and was slated to be fixed in TagLib 2.0.

The 1:1 replacement is `RIFF::WAV::File::ID3v2Tag`, which was added in
TagLib 1.9 (released 10 years ago).
  • Loading branch information
JackH3103 authored and Pointedstick committed Dec 11, 2023
1 parent 26fd2a5 commit c9a90ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/extractors/taglibextractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ void TagLibExtractor::extract(ExtractionResult* result)
extractAudioProperties(&file, result);
readGenericProperties(file.properties(), result);
if (file.hasID3v2Tag()) {
result->addImageData(extractId3Cover(file.tag(), imageTypes));
extractId3Tags(file.tag(), result);
result->addImageData(extractId3Cover(file.ID3v2Tag(), imageTypes));
extractId3Tags(file.ID3v2Tag(), result);
}
}
} else if (mimeType == QLatin1String("audio/x-musepack")) {
Expand Down
2 changes: 1 addition & 1 deletion src/writers/taglibwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ void TagLibWriter::write(const WriteData& data)
auto savedProperties = file.properties();
writeGenericProperties(savedProperties, properties);
file.setProperties(savedProperties);
auto id3Tags = dynamic_cast<TagLib::ID3v2::Tag*>(file.tag());
auto id3Tags = file.ID3v2Tag();
if (id3Tags) {
writeID3v2Tags(id3Tags, properties);
writeID3v2Cover(id3Tags, data.imageData());
Expand Down

0 comments on commit c9a90ee

Please sign in to comment.