Bug 465716 - Support for synchronized lyrics file in the same folder
Summary: Support for synchronized lyrics file in the same folder
Status: RESOLVED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-14 15:46 UTC by Thiago Sueto
Modified: 2024-10-22 19:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Sueto 2023-02-14 15:46:29 UTC
Currently Elisa already does synchronized lyrics that are embedded into the Lyrics id3 tag.

Apparently the same formatting used for synchronized lyrics in the Lyrics id3 tag is used for LRC files: https://en.wikipedia.org/wiki/LRC_(file_format), so if you copy the contents of an LRC file and put it into the song metadata with Kid3 it shows up in Elisa.

Usually, when a music player supports LRC files, you just need to have an LRC file in the same folder as the song. It would be nice if Elisa supported this.

If you want to test this with an LRC file, you can use Android's LRC Editor on a certain song or I can supply one.
Comment 1 Bug Janitor Service 2023-06-03 17:04:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/464
Comment 2 Bug Janitor Service 2024-10-07 15:09:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/629
Comment 3 Jack Hill 2024-10-22 19:08:05 UTC
Git commit f8602efd275fe6a5ef61569e4cc36043fe4dafad by Jack Hill, on behalf of Gary Wang.
Committed on 22/10/2024 at 19:08.
Pushed by jackh into branch 'master'.

Lyrics: load sidecar .lrc file as song lyrics

It's common to have lyrics in a sidecar file (`.lrc`). Currently Elisa only loads lyrics lived in the ID3 tag and ignores the sidecar file.

This commit adds support for reading from lrc files, but disables the ability to modify the lyrics of an lrc file. TrackDataType now stores the location of the lyrics file, which should make it easy to implement this in the future.

Tested manually:

1. Create an audio file called `sample_track.mp3` and a valid lyrics file `sample_track.lrc` in the same directory
2. Use Elisa to play `sample_track.mp3`
3. Open the Now Playing view
4. Open the file metadata dialog

The lyrics are visible in the metadata dialog and Now Playing view. The lyrics are also correctly synchronized.

M  +1    -1    src/datatypes.h
M  +14   -1    src/filewriter.cpp
M  +3    -1    src/models/editabletrackmetadatamodel.cpp
M  +39   -17   src/models/trackmetadatamodel.cpp
M  +3    -2    src/models/trackmetadatamodel.h

https://invent.kde.org/multimedia/elisa/-/commit/f8602efd275fe6a5ef61569e4cc36043fe4dafad