foo_openlyrics icon indicating copy to clipboard operation
foo_openlyrics copied to clipboard

Add support for title formatting in "Tags to which lyrics will be saved"

Open FPChaim opened this issue 1 year ago • 1 comments

Title formatting would allow for automating the prefered tag to where the lyrics are saved based on the current playing song according to the user necessities while not changing the default behavior for "casual" users. Also I believe this shouldn't be too difficult to implement because it should be similar to the "File name format" in the "Local files" settings and the "Skip filter" in the "Search" settings.

The reason I want this is because my music library is shared between foobar2000, Mp3tag and Poweramp and to get the maximum compatibility between then I have to change the tagging field according to the tagging standard each time I change between songs that use different tagging standards. For example, Mp3tag reads the USLT ID3v2.x frame for a mp3 file, which means I have to use UNSYNCED LYRICS in foobar2000, while I have to use LYRICS for m4a files and UNSYNCEDLYRICS for flac, ogg and opus for the lyrics to appear as a standard field in Mp3tag. Visually:

File type Tag field
m4a LYRICS
mp3 UNSYNCED LYRICS
everthing else (flac, ogg, opus) UNSYNCEDLYRICS

So, in this case I would use a code that's something like this in the "Tags to which lyrics will be saved" preference page: $puts(lyrics_type,UNSYNCEDLYRICS)$if($stricmp($ext(%filename_ext%),m4a),$puts(lyrics_type,LYRICS))$if($stricmp($ext(%filename_ext%),mp3),$puts(lyrics_type,UNSYNCED LYRICS))$get(lyrics_type) This would set the tag according to the file type while fallbacking to UNSYNCEDLYRICS for safety.

Current preference page for "Metadata tags": preferences_current Proposed (concept): preferences_after

Thanks in advance!

FPChaim avatar Sep 09 '24 15:09 FPChaim

Unless there's a specific reason to save lyrics differently, I'd actually prefer for these rules to be implemented as the default. The plugin already "violates" the spec by putting synced lyrics into the "UNSYNCED LYRICS" field by default, so it'd make sense to improve compatibility with more players.

It's unfortunate that ID3's USLT, MP4's ©lyr, Vorbis's UNSYNCEDLYRICS are mapped to different field names, but I think it's the lyrics plugin's job to try to improve compatibility.

Maybe the best approach would be to have the OP's expression as the default and to allow customizing it.

Athari avatar Apr 28 '25 22:04 Athari