From b47a5f9063d2e3ae051a34e8e6b23c7c19ffbcd1 Mon Sep 17 00:00:00 2001 From: Josh Patra Date: Fri, 30 Jan 2026 00:21:37 -0500 Subject: [PATCH] Add ' - SW' suffix to external albums and artists Makes it easy to distinguish external content from local Jellyfin library --- .../Jellyfin/JellyfinResponseBuilder.cs | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/allstarr/Services/Jellyfin/JellyfinResponseBuilder.cs b/allstarr/Services/Jellyfin/JellyfinResponseBuilder.cs index 7d67a06..93acc4e 100644 --- a/allstarr/Services/Jellyfin/JellyfinResponseBuilder.cs +++ b/allstarr/Services/Jellyfin/JellyfinResponseBuilder.cs @@ -304,10 +304,17 @@ public class JellyfinResponseBuilder /// public Dictionary ConvertAlbumToJellyfinItem(Album album) { + // Add " - SW" suffix to external album names + var albumName = album.Title; + if (!album.IsLocal) + { + albumName = $"{album.Title} - SW"; + } + var item = new Dictionary { ["Id"] = album.Id, - ["Name"] = album.Title, + ["Name"] = albumName, ["ServerId"] = "allstarr", ["Type"] = "MusicAlbum", ["IsFolder"] = true, @@ -328,10 +335,10 @@ public class JellyfinResponseBuilder }, ["BackdropImageTags"] = new string[0], ["ImageBlurHashes"] = new Dictionary(), - ["LocationType"] = "FileSystem", // External content appears as local files to clients - ["MediaType"] = (object?)null, // Match Jellyfin structure - ["ChannelId"] = (object?)null, // Match Jellyfin structure - ["CollectionType"] = (object?)null, // Match Jellyfin structure + ["LocationType"] = "FileSystem", + ["MediaType"] = (object?)null, + ["ChannelId"] = (object?)null, + ["CollectionType"] = (object?)null, ["UserData"] = new Dictionary { ["PlaybackPositionTicks"] = 0, @@ -364,10 +371,17 @@ public class JellyfinResponseBuilder /// public Dictionary ConvertArtistToJellyfinItem(Artist artist) { + // Add " - SW" suffix to external artist names + var artistName = artist.Name; + if (!artist.IsLocal) + { + artistName = $"{artist.Name} - SW"; + } + var item = new Dictionary { ["Id"] = artist.Id, - ["Name"] = artist.Name, + ["Name"] = artistName, ["ServerId"] = "allstarr", ["Type"] = "MusicArtist", ["IsFolder"] = true,