Auto load timecoded lyrics from LRC or metadata #5790
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Description:
MPV and IINA already support LRC timecoded lyrics, but you need to manually load them from
Subtitles > Load External Subtitle...for each audio file. This PR makes a few improvements on that front:.lrcfiles if they have the same name as the input filelyricsmetadata from audio files and if it matches LRC format (it is timecoded), load it as suchThere is one minor issue with the current implementation - if the subtitles are extracted from metadata, they are saved to a temporary
.lrcfile so it can be loaded with mpv command. The file is immediately deleted after. I couldn't find a way to load from memory, but if there is, please let me know.The lyrics code currently runs on any input file, including video, but it causes no issues if it doesn't find LRC file or relevant metadata. If this is unwanted for videos, please let me know how to refactor it.
I tested MP3 and M4A (AAC) with embedded lyrics as well as the same files with external LRC lyrics. All scenarios worked for me. If anybody wants to test without compiling, I am uploading a build here:
https://files.catbox.moe/3c2iin.zip