diff options
| author | Niels van Velzen <nielsvanvelzen@users.noreply.github.com> | 2025-01-11 17:35:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-11 09:35:44 -0700 |
| commit | 3b8e614819b51c2acf73f95874dfe881f5146404 (patch) | |
| tree | 153059e760287198f42e1720883b5c120014f237 | |
| parent | 17bbe4a2cd7f7c7cdcd4a2ce06e9e076c616d7ae (diff) | |
Prefer ApiKey over api_key in generated URL's (#13342)
| -rw-r--r-- | Jellyfin.Api/Controllers/SubtitleController.cs | 2 | ||||
| -rw-r--r-- | Jellyfin.Api/Helpers/DynamicHlsHelper.cs | 4 | ||||
| -rw-r--r-- | Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamInfo.cs | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/SubtitleController.cs b/Jellyfin.Api/Controllers/SubtitleController.cs index 9da1dce93..e5df873f5 100644 --- a/Jellyfin.Api/Controllers/SubtitleController.cs +++ b/Jellyfin.Api/Controllers/SubtitleController.cs @@ -395,7 +395,7 @@ public class SubtitleController : BaseJellyfinApiController var url = string.Format( CultureInfo.InvariantCulture, - "stream.vtt?CopyTimestamps=true&AddVttTimeMap=true&StartPositionTicks={0}&EndPositionTicks={1}&api_key={2}", + "stream.vtt?CopyTimestamps=true&AddVttTimeMap=true&StartPositionTicks={0}&EndPositionTicks={1}&ApiKey={2}", positionTicks.ToString(CultureInfo.InvariantCulture), endPositionTicks.ToString(CultureInfo.InvariantCulture), accessToken); diff --git a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs index 0e620e72a..9802be7f4 100644 --- a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs +++ b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs @@ -550,7 +550,7 @@ public class DynamicHlsHelper var url = string.Format( CultureInfo.InvariantCulture, - "{0}/Subtitles/{1}/subtitles.m3u8?SegmentLength={2}&api_key={3}", + "{0}/Subtitles/{1}/subtitles.m3u8?SegmentLength={2}&ApiKey={3}", state.Request.MediaSourceId, stream.Index.ToString(CultureInfo.InvariantCulture), 30.ToString(CultureInfo.InvariantCulture), @@ -587,7 +587,7 @@ public class DynamicHlsHelper var url = string.Format( CultureInfo.InvariantCulture, - "Trickplay/{0}/tiles.m3u8?MediaSourceId={1}&api_key={2}", + "Trickplay/{0}/tiles.m3u8?MediaSourceId={1}&ApiKey={2}", width.ToString(CultureInfo.InvariantCulture), state.Request.MediaSourceId, user.GetToken()); diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs index af57bc134..49128562c 100644 --- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs +++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs @@ -536,7 +536,7 @@ public class TrickplayManager : ITrickplayManager if (trickplayInfo.ThumbnailCount > 0) { - const string urlFormat = "{0}.jpg?MediaSourceId={1}&api_key={2}"; + const string urlFormat = "{0}.jpg?MediaSourceId={1}&ApiKey={2}"; const string decimalFormat = "{0:0.###}"; var resolution = $"{trickplayInfo.Width}x{trickplayInfo.Height}"; diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index 1ae4e1962..e44152213 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -979,7 +979,7 @@ public class StreamInfo } list.Add(new NameValuePair("PlaySessionId", item.PlaySessionId ?? string.Empty)); - list.Add(new NameValuePair("api_key", accessToken ?? string.Empty)); + list.Add(new NameValuePair("ApiKey", accessToken ?? string.Empty)); string? liveStreamId = item.MediaSource?.LiveStreamId; list.Add(new NameValuePair("LiveStreamId", liveStreamId ?? string.Empty)); @@ -1189,7 +1189,7 @@ public class StreamInfo if (!string.IsNullOrEmpty(accessToken)) { - info.Url += "?api_key=" + accessToken; + info.Url += "?ApiKey=" + accessToken; } info.IsExternalUrl = false; |
