feat: add synced lyrics panel and fullscreen view

- fetch lyrics from lrclib in the background, only while visible
- L toggles side panel, F opens fullscreen, :lyrics as a command
- highlight current line with a progress fill, fade surrounding lines
- fall back to scrollable plain lyrics when no synced version exists
This commit is contained in:
socatlolmeow 2026-10-17 21:04:28 +02:00
commit 8f650f8820
6 changed files with 497 additions and 43 deletions

View file

@ -36,6 +36,7 @@ pub enum Command {
AddTo(String),
Import(String),
Artist,
Lyrics,
Help,
}
@ -68,6 +69,7 @@ pub const COMMAND_NAMES: &[&str] = &[
"addto",
"import",
"artist",
"lyrics",
"help",
];
@ -175,6 +177,7 @@ pub fn parse(line: &str) -> Result<Option<Command>, String> {
Import(arg.to_string())
}
"artist" | "ar" => Artist,
"lyrics" | "ly" => Lyrics,
"help" | "h" => Help,
other => return Err(format!("unknown command: :{other} (try :help)")),
};
@ -238,6 +241,7 @@ mod tests {
fn artist_command() {
assert_eq!(parse("artist"), Ok(Some(Command::Artist)));
assert_eq!(parse(":ar"), Ok(Some(Command::Artist)));
assert_eq!(parse("lyrics"), Ok(Some(Command::Lyrics)));
}
#[test]