FLAC lyrics fix - where to contribute?

There’s an issue where Elisa doesn’t display lyrics stored in the UNSYNCEDLYRICS tag of Ogg / FLAC files. I’ve figured out the cause and would like to contribute a fix, but I’m not sure where the right place for the fix is.

Problem overview

The root cause of the issue is in TagLib, which kfilemetadata uses to read the tags from various audio formats. TagLib normalizes tag names to their Vorbis names, but it conflates synced and unsynced lyrics, so ID3 USLT (unsynced lyrics) is normalized to Vorbis LYRICS (synced lyrics), while ID3 SYLT (synced lyrics) and Vorbis UNSYNCEDLYRICS are both ignored and passed straight through. ( Mapping of Properties to Various Formats (TagLib) )

Then, kfilemetadata reads LYRICS from the TagLib result and saves it with the key Property::Lyrics. It appears to ignore and discard any unrecognized tags, including UNSYNCEDLYRICS and SYLT. ( src/extractors/taglibextractor.cpp · master · Frameworks / KFileMetaData · GitLab )

Finally, Elisa grabs and parses the lyrics from kfilemetadata.

Possible solutions

I can think of the following solutions, none of which are without downsides. I’m looking for advice on which of these approaches seems the best to pursue, or for any other possible solutions.

1. TagLib: Split synced and unsynced lyrics

Change TagLib to normalize all synced lyrics to LYRICS, and all unsynced lyrics to a new tagUNSYNCEDLYRICS. Update kfilemetadata and Elisa to recognize both.

Pros: Probably the most objectively correct solution; preserves roundtripping; improves quirks in TagLib’s API.

Cons: A breaking change to both TagLib and kfilemetadata.

2. TagLib: Introduce new names for synced and unsynced lyrics

Change TagLib to normalize lyrics across 2 new tags SYNCEDLYRICS and UNSYNCEDLYRICS, deprecating LYRICS. Update kfilemetadata and Elisa to recognize both.

Pros: Not a breaking change.

Cons: Breaks parity with Vorbis tag names (SYNCEDLYRICS isn’t an existing Vorbis tag name).

3. kfilemetadata: Map all lyrics to Property::Lyrics

Change kfilemetadata to additionally map UNSYNCEDLYRICS and SYLT to Property::Lyrics.

Pros: No changes to TagLib or Elisa required.

Cons: Breaks roundtripping of UNSYNCEDLYRICS and SYLT (will be saved by kfilemetadata into LYRICS and USLT respectively).

4. kfilemetadata: Expose UNSYNCEDLYRICS and SYLT

Add Property::VorbisUnsyncedLyrics and Property::Id3SyncedLyrics (or some other names) to pass through UNSYNCEDLYRICS and SYLT separately. Update Elisa to recognize them as well.

Pros: Not a breaking change; no changes to TagLib required; preserves roundtripping.

Cons: A confusing workaround that propagates rather than fixes the core issue.

You can report the issue to Taglib, see whether they would consider an API change.

Otherwise 3. or 4. would be acceptable, kfilemetadata is allowed to normalize its inputs.