mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-10 07:58:39 -05:00
add 1337 kbps bitrate to external track MediaSources
This commit is contained in:
@@ -289,6 +289,24 @@ public class JellyfinResponseBuilder
|
|||||||
var providerIds = (Dictionary<string, string>)item["ProviderIds"]!;
|
var providerIds = (Dictionary<string, string>)item["ProviderIds"]!;
|
||||||
providerIds["ISRC"] = song.Isrc;
|
providerIds["ISRC"] = song.Isrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add MediaSources with bitrate for external tracks
|
||||||
|
item["MediaSources"] = new[]
|
||||||
|
{
|
||||||
|
new Dictionary<string, object?>
|
||||||
|
{
|
||||||
|
["Id"] = song.Id,
|
||||||
|
["Type"] = "Default",
|
||||||
|
["Container"] = "flac",
|
||||||
|
["Size"] = (song.Duration ?? 180) * 1337 * 128, // Approximate file size
|
||||||
|
["Bitrate"] = 1337000, // 1337 kbps in bps
|
||||||
|
["Path"] = $"/music/{song.Artist}/{song.Album}/{song.Title}.flac",
|
||||||
|
["Protocol"] = "File",
|
||||||
|
["SupportsDirectStream"] = true,
|
||||||
|
["SupportsTranscoding"] = true,
|
||||||
|
["SupportsDirectPlay"] = true
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(song.Genre))
|
if (!string.IsNullOrEmpty(song.Genre))
|
||||||
|
|||||||
Reference in New Issue
Block a user