make taglib work again???

This commit is contained in:
Kendall Garner
2023-12-03 15:30:13 -08:00
parent baf73e6f21
commit ed8bcdc0e6
2 changed files with 4 additions and 4 deletions

View File

@@ -40,8 +40,7 @@ var _ = Describe("Extractor", func() {
Expect(m).To(HaveKeyWithValue("album", []string{"Album", "Album"}))
Expect(m).To(HaveKeyWithValue("artist", []string{"Artist", "Artist"}))
Expect(m).To(HaveKeyWithValue("albumartist", []string{"Album Artist"}))
// Taglib is doing something silly now... this is commented out
// Expect(m).To(HaveKeyWithValue("compilation", []string{"1"})) // Compilation
Expect(m).To(HaveKeyWithValue("compilation", []string{"1"})) // Compilation
Expect(m).To(HaveKeyWithValue("genre", []string{"Rock"}))
Expect(m).To(HaveKeyWithValue("date", []string{"2014-05-21", "2014"}))
Expect(m).To(HaveKeyWithValue("originaldate", []string{"1996-11-21"}))

View File

@@ -91,9 +91,10 @@ int taglib_read(const FILENAME_CHAR_T *filename, unsigned long id) {
// with many players, so they will not be parsed
if (id3Tags != NULL) {
const auto &frames = id3Tags->frameListMap();
bool hasLyrics = false;
const auto usltList = id3Tags->frameList("USLT");
const auto usltList = frames["USLT"];
if (!usltList.isEmpty()) {
for (const auto &tag: usltList) {
TagLib::ID3v2::UnsynchronizedLyricsFrame *frame = dynamic_cast<TagLib::ID3v2::UnsynchronizedLyricsFrame *>(tag);
@@ -115,7 +116,7 @@ int taglib_read(const FILENAME_CHAR_T *filename, unsigned long id) {
}
}
const auto syltList = id3Tags->frameList("SYLT");
const auto syltList = frames["SYLT"];
if (!syltList.isEmpty()) {
for (const auto &tag: syltList) {