diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-03-14 18:40:44 +0000 |
|---|---|---|
| committer | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-03-14 18:40:44 +0000 |
| commit | 4c7680e186ec76053f6d54e29e5cd67c5a0b17f7 (patch) | |
| tree | cf21e8a3ac31487d4126aa0fceaa498473f02c43 /Jellyfin.Api/Helpers/StreamingHelpers.cs | |
| parent | 6087831aa65398a6305570c4dc84f0bc2613b842 (diff) | |
| parent | bd70f562189e81d409caf2f4f67d8d495d4bbf1e (diff) | |
Merge remote-tracking branch 'upstream/master' into SubnetOverlappFix
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 d20a02cf5..e2306aa27 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; |
