navidrome icon indicating copy to clipboard operation
navidrome copied to clipboard

Support external .lrc file

Open Extarys opened this issue 4 years ago • 28 comments

Is your feature request related to a problem? Please describe.

The PR #1406 is awesome as I love lyrics, but all my synched lyrics are in a file ending with .lrc and not inside the metadata of the song.

Describe the solution you'd like

I suggest that either on library scan, or when a song is started, navidrome look up if there is a file named like the song being played, but ending in .lrc 01 - My song.flac > 01 - My song.lrc

Additional context

On PC I currently use Tauon when I want to see lyrics, sadly my "away" music player (Jellyfin) doesn't support lyrics at all.

EDIT : Sorry I just saw this comment a little too late, closing. https://github.com/navidrome/navidrome/issues/491#issuecomment-946782864

Extarys avatar Oct 21 '21 23:10 Extarys

You can keep this open, we don't have any GH issue to track this, so thanks for opening it!

deluan avatar Oct 22 '21 02:10 deluan

I believe mp3tag, MusicBee and foobar2000 can all be used to mass-embed .lrc to FLAC tags, so that could be a workaround in the mean time.

certuna avatar Oct 29 '21 08:10 certuna

I am starting to work on this issue now.

dheerajdlalwani avatar Nov 02 '21 05:11 dheerajdlalwani

Hopefully this can be added soon. Thanks for all of your work guys ;-D

chermy avatar Nov 02 '21 16:11 chermy

Maybe worth considering that there's also .elrc files, with per-word timestamps: https://stage.elsdoerfer.com/elrcmaker/

certuna avatar Nov 09 '21 17:11 certuna

@certuna Those are way harder to make though and I never caught a wild one - but yes they esists and it's dope :D

Extarys avatar Nov 09 '21 21:11 Extarys

@dheerajdlalwani how is the implementation of this going? Do you need any help? :)

a0g83agbc84 avatar Mar 11 '22 14:03 a0g83agbc84

Hey, @KrLx1994roller ! Thank you for asking and I'm so sorry for the late replies. I haven't been actively working on this. It completely slipped off my mind because of college assignments and projects.

dheerajdlalwani avatar Mar 15 '22 04:03 dheerajdlalwani

@dheerajdlalwani, @deluan Any ideas on how we can detect the .lrc files changing? At first I thought to just load the corresponding .lrc file in metadata.Extract(), but it's called only for updated audio files. Guess there's no other way except implementing it in processChangedDir()?

mrsobakin avatar May 10 '22 15:05 mrsobakin

@mrsobakin You mean if the file was modified? I would calculate a CRC32 checksum and compare to the previous file or check last modified date.

Are you working on this? :heart:

Extarys avatar May 10 '22 18:05 Extarys

@Extarys No, I mean detecting the presence of a .lrc file. You see, when navidrome performs the scan of a directory, it only checks *updated* *audio* files. Imagine this situation: You already have some track in navidrome library and you decide to add a .lrc file for it. Navidrome performs scan of changed directory, but finds nothing, because the track file didn't change, and the .lrc is not an audio.

There is an obvious solution - scan directory for .lrc files and store them in database, but as far as I know, it would require changing the database structure, which:

  1. Seems like an overkill for this.
  2. I don't feel competent enough doing.

mrsobakin avatar May 10 '22 19:05 mrsobakin

When playing a song, check if the lrc file is there. If it's there, load it in the browser. This will require an additional file seek for every song played though, but I guess this is how most players implement this.

Tauon have a row in the GUI that shows if there are lyrics present, that would require a new row in the DB like hasLrc set to false by default and updated to true on library scan when one is found

Extarys avatar May 10 '22 21:05 Extarys

Okay, so I think I came up somewhat good solution... We will load external lyrics in metadata.Extract(), and we will also change processChangedDir() to update track if corresponding lyrics file gets updated. The updated_at row will be used for both lyrics and track files. Also, since they share stem (name w/o extension), we don't have to create any new rows.

The more I think about it, the more it seems that we should just go the overkill way and create a table for .lrc files. It may seem more complicated, but at least it's not janky.

I'll begin to experiment with the this "janky" solution, but I really think we should discuss the way external lyrics will be implemented.

mrsobakin avatar May 11 '22 01:05 mrsobakin

The solution I described above works.. Almost. Because we store both .lrc and track update time in a single updated_at row, lyrics aren't "unloaded" when the corresponding .lrc file is deleted. Otherwise, it works as expected.

To this, we have 2 solutions:

  1. More kludges.
  2. Redesign of scanning system and modifying the db.

Both of which is.. meh

mrsobakin avatar May 19 '22 02:05 mrsobakin

I would argue that modifying the DB is the best future-proof option here, but I'm not the one doing the heavy-lifting, so it's still up to you :smile:

Extarys avatar May 20 '22 20:05 Extarys

hope can support next versioin

xinmans avatar Aug 18 '22 04:08 xinmans

hope can support next versioin

Unfortunately, the new version released, nothing happend. <LYRICS> tag works fine. You should try MP3TAG import text file: LYRICS -> %_filename%.lrc 1

chermy avatar Oct 16 '22 17:10 chermy

现在发现歌词切换经常错误,当第一首歌正常播放完,切换第二首歌时,歌词切换会出错,有时仍然显示上一首歌的歌词,有时候显示的是这一首歌的但时间是错误的,打开播放列表,点击重新播放又能正常显示了,

使用的是docker版本

KITblue avatar Dec 14 '22 11:12 KITblue

Thank you very much to all the developers for their hard work in developing and perfecting this project. I wonder when external ".lrc" files will be supported. I have nearly two thousand songs in my music library, and their lyrics are all in lrc files of the same name, they are all stored in cloud services, it would be a big project to pull it back and repackage the lyrics files, External lrc lyrics file support can make maintaining music library easier, hope this can be resolved.

smmya avatar Apr 24 '23 01:04 smmya

Yes it will be, at some point, but it is not a priority ATM. As always, Pull Requests are mostly welcome :)

deluan avatar Apr 28 '23 01:04 deluan

Really Looking forward to that function. I just downloaded about 20,000 songs from PT website. All are external ".lrc". I can not change the files because I need keep seeding. By the way, the navidrome is wonderful and meets my requirements. Thanks for your working.

wq2020wdm avatar Jun 14 '23 02:06 wq2020wdm

any news about .lrc support?

eatgrass avatar Jul 20 '23 13:07 eatgrass

I build a python cli tool, https://github.com/IceWreck/tagpatch to take my lrc files and embed them inside corresponding music file automatically. tagpatch embed-lrc -n -s ~/Music, look at your changes, confirm and you're done.

And now I can view lyrics inside navidrome.

Note that this does modify your music file, so it doesn't help if you want to continue seeding.

IceWreck avatar Jul 29 '23 10:07 IceWreck

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Navidrome team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open. If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

github-actions[bot] avatar Jan 26 '24 01:01 github-actions[bot]