diff options
| author | Niels van Velzen <nielsvanvelzen@users.noreply.github.com> | 2022-09-23 23:09:35 -0400 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2022-09-23 23:09:35 -0400 |
| commit | 1e72ba4c09eddf92c5a30f225505825b93336b6f (patch) | |
| tree | f819032c5b6eb4129e98f053816319fa5820410b | |
| parent | 0309c5622e31df7593a07880e2669bd623b71f88 (diff) | |
Backport pull request #8214 from jellyfin/release-10.8.z
Make userId truly optional in UniversalAudioController
Original-merge: af877063795469ac3d94d356b2787e296606f571
Merged-by: Bond-009 <bond.009@outlook.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
| -rw-r--r-- | Jellyfin.Api/Controllers/UniversalAudioController.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/UniversalAudioController.cs b/Jellyfin.Api/Controllers/UniversalAudioController.cs index 43b8e2414..c463fb08a 100644 --- a/Jellyfin.Api/Controllers/UniversalAudioController.cs +++ b/Jellyfin.Api/Controllers/UniversalAudioController.cs @@ -111,7 +111,13 @@ namespace Jellyfin.Api.Controllers [FromQuery] bool enableRedirection = true) { var deviceProfile = GetDeviceProfile(container, transcodingContainer, audioCodec, transcodingProtocol, breakOnNonKeyFrames, transcodingAudioChannels, maxAudioSampleRate, maxAudioBitDepth, maxAudioChannels); - (await _authorizationContext.GetAuthorizationInfo(Request).ConfigureAwait(false)).DeviceId = deviceId; + var authorizationInfo = await _authorizationContext.GetAuthorizationInfo(Request).ConfigureAwait(false); + authorizationInfo.DeviceId = deviceId; + + if (!userId.HasValue || userId.Value.Equals(Guid.Empty)) + { + userId = authorizationInfo.UserId; + } var authInfo = await _authorizationContext.GetAuthorizationInfo(Request).ConfigureAwait(false); |
