Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support external .lrc file #1421

Open
Extarys opened this issue Oct 21, 2021 · 23 comments
Open

Support external .lrc file #1421

Extarys opened this issue Oct 21, 2021 · 23 comments

Comments

@Extarys
Copy link

Extarys commented Oct 21, 2021

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. #491 (comment)

@deluan
Copy link
Member

deluan commented Oct 22, 2021

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

@deluan deluan reopened this Oct 22, 2021
@certuna
Copy link
Contributor

certuna commented Oct 29, 2021

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.

@dheerajdlalwani
Copy link
Contributor

I am starting to work on this issue now.

@chermy
Copy link

chermy commented Nov 2, 2021

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

@certuna
Copy link
Contributor

certuna commented Nov 9, 2021

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

@Extarys
Copy link
Author

Extarys commented Nov 9, 2021

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

@a0g83agbc84
Copy link

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

@dheerajdlalwani
Copy link
Contributor

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.

@mrsobakin
Copy link

@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()?

@Extarys
Copy link
Author

Extarys commented May 10, 2022

@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? ❤️

@mrsobakin
Copy link

@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.

@Extarys
Copy link
Author

Extarys commented May 10, 2022

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

@mrsobakin
Copy link

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
Copy link

mrsobakin commented May 19, 2022

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

@Extarys
Copy link
Author

Extarys commented May 20, 2022

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 😄

@xinmans
Copy link

xinmans commented Aug 18, 2022

hope can support next versioin

@chermy
Copy link

chermy commented Oct 16, 2022

hope can support next versioin

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

@KITblue
Copy link
Contributor

KITblue commented Dec 14, 2022

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

使用的是docker版本

@smmya
Copy link

smmya commented Apr 24, 2023

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.

@deluan
Copy link
Member

deluan commented Apr 28, 2023

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

@wq2020wdm
Copy link

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.

@eatgrass
Copy link

any news about .lrc support?

@IceWreck
Copy link

IceWreck commented Jul 29, 2023

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.

Copy link

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 github-actions bot added the stale label Jan 26, 2024
@deluan deluan added keep and removed stale labels Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests