From 680454e76e4fe9735a87a5944f1e83f5a00f946d Mon Sep 17 00:00:00 2001 From: Josh Patra Date: Fri, 30 Jan 2026 02:28:05 -0500 Subject: [PATCH] Clarify lyrics preference: synced lyrics preferred over plain Already working correctly, just made the code clearer with explicit variable --- allstarr/Controllers/JellyfinController.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/allstarr/Controllers/JellyfinController.cs b/allstarr/Controllers/JellyfinController.cs index 058a5c7..b669110 100644 --- a/allstarr/Controllers/JellyfinController.cs +++ b/allstarr/Controllers/JellyfinController.cs @@ -1002,7 +1002,13 @@ public class JellyfinController : ControllerBase return NotFound(new { error = "Lyrics not found" }); } + // Prefer synced lyrics, fall back to plain + var lyricsText = lyrics.SyncedLyrics ?? lyrics.PlainLyrics ?? ""; + var isSynced = !string.IsNullOrEmpty(lyrics.SyncedLyrics); + // Return in Jellyfin lyrics format + // For synced lyrics, return the LRC format directly + // For plain lyrics, return as a single block var response = new { Metadata = new @@ -1011,14 +1017,14 @@ public class JellyfinController : ControllerBase Album = lyrics.AlbumName, Title = lyrics.TrackName, Length = lyrics.Duration, - IsSynced = !string.IsNullOrEmpty(lyrics.SyncedLyrics) + IsSynced = isSynced }, Lyrics = new[] { new { Start = (long?)null, - Text = lyrics.SyncedLyrics ?? lyrics.PlainLyrics ?? "" + Text = lyricsText } } };