diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-03-10 11:50:08 +0100 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2021-03-21 19:08:26 -0400 |
| commit | 53576fe1b88e970ffecc817f3824a22de81e9d16 (patch) | |
| tree | 68cb19bac7a3842a8ea66547502eb167a1b4f0fc /Jellyfin.Api/Helpers/StreamingHelpers.cs | |
| parent | da3b7bb6840f99e17e47b4e0d9844445f8361122 (diff) | |
Merge pull request #5403 from BaronGreenback/DLNAProfileFix
(cherry picked from commit 5592967497b4808330eea010981810181489d41d)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'Jellyfin.Api/Helpers/StreamingHelpers.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/StreamingHelpers.cs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Jellyfin.Api/Helpers/StreamingHelpers.cs b/Jellyfin.Api/Helpers/StreamingHelpers.cs index 4957ee8b8..7392b0997 100644 --- a/Jellyfin.Api/Helpers/StreamingHelpers.cs +++ b/Jellyfin.Api/Helpers/StreamingHelpers.cs @@ -508,17 +508,15 @@ namespace Jellyfin.Api.Helpers private static void ApplyDeviceProfileSettings(StreamState state, IDlnaManager dlnaManager, IDeviceManager deviceManager, HttpRequest request, string? deviceProfileId, bool? @static) { - var headers = request.Headers; - if (!string.IsNullOrWhiteSpace(deviceProfileId)) { state.DeviceProfile = dlnaManager.GetProfile(deviceProfileId); - } - else if (!string.IsNullOrWhiteSpace(deviceProfileId)) - { - var caps = deviceManager.GetCapabilities(deviceProfileId); - state.DeviceProfile = caps == null ? dlnaManager.GetProfile(headers) : caps.DeviceProfile; + if (state.DeviceProfile == null) + { + var caps = deviceManager.GetCapabilities(deviceProfileId); + state.DeviceProfile = caps == null ? dlnaManager.GetProfile(request.Headers) : caps.DeviceProfile; + } } var profile = state.DeviceProfile; |
