From 5acdacf1322188186b539601744ce5d8c1109e27 Mon Sep 17 00:00:00 2001 From: Josh Patra Date: Sun, 1 Feb 2026 12:23:08 -0500 Subject: [PATCH] Fix unsynced lyrics displaying as one big line When LRClib returns plain/unsynced lyrics, they contain newlines but were being sent as a single text block. Jellyfin clients would display them all on one line. Now splits plain lyrics by newlines and sends each line separately, so they display properly line-by-line in the client. LRClib search URL format: https://lrclib.net/api/get\?track_name\=\{track\}\&artist_name\=\{artist\}\&album_name\=\{album\}\&duration\=\{seconds\} --- allstarr/Controllers/JellyfinController.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/allstarr/Controllers/JellyfinController.cs b/allstarr/Controllers/JellyfinController.cs index 8cb5348..5fafbd7 100644 --- a/allstarr/Controllers/JellyfinController.cs +++ b/allstarr/Controllers/JellyfinController.cs @@ -1062,13 +1062,26 @@ public class JellyfinController : ControllerBase } } } + else if (!string.IsNullOrEmpty(lyricsText)) + { + // Plain lyrics - split by newlines and return each line separately + var lines = lyricsText.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries); + foreach (var line in lines) + { + lyricLines.Add(new + { + Start = (long?)null, + Text = line.Trim() + }); + } + } else { - // Plain lyrics - return as single block + // No lyrics at all lyricLines.Add(new { Start = (long?)null, - Text = lyricsText + Text = "" }); }