diff --git a/allstarr/Models/Domain/Song.cs b/allstarr/Models/Domain/Song.cs
index f9abe4b..55397cb 100644
--- a/allstarr/Models/Domain/Song.cs
+++ b/allstarr/Models/Domain/Song.cs
@@ -99,4 +99,10 @@ public class Song
/// 0 = Naturally clean, 1 = Explicit, 2 = Not applicable, 3 = Clean/edited version, 6/7 = Unknown
///
public int? ExplicitContentLyrics { get; set; }
+
+ ///
+ /// Raw Jellyfin metadata (MediaSources, etc.) for local tracks
+ /// Preserved to maintain bitrate and other technical details
+ ///
+ public Dictionary? JellyfinMetadata { get; set; }
}
diff --git a/allstarr/Services/Jellyfin/JellyfinModelMapper.cs b/allstarr/Services/Jellyfin/JellyfinModelMapper.cs
index 6ea1502..3f15836 100644
--- a/allstarr/Services/Jellyfin/JellyfinModelMapper.cs
+++ b/allstarr/Services/Jellyfin/JellyfinModelMapper.cs
@@ -186,6 +186,14 @@ public class JellyfinModelMapper
// Cover art URL construction
song.CoverArtUrl = $"/Items/{id}/Images/Primary";
+
+ // Preserve Jellyfin metadata (MediaSources, etc.) for local tracks
+ // This ensures bitrate and other technical details are maintained
+ song.JellyfinMetadata = new Dictionary();
+ if (item.TryGetProperty("MediaSources", out var mediaSources))
+ {
+ song.JellyfinMetadata["MediaSources"] = JsonSerializer.Deserialize