aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api
diff options
context:
space:
mode:
authorTim Eisele <Ghost_of_Stone@web.de>2025-03-28 13:51:44 +0100
committerGitHub <noreply@github.com>2025-03-28 06:51:44 -0600
commit9657708b384dfca474c28f673a2d79a3f3e4db9f (patch)
treeb9ebc35b8162ee6c6f96c6ae8f4d3c1a996b0a76 /Jellyfin.Api
parentcb931e00627559e4e9d14d2cc7d4ec8e00eb7061 (diff)
Reduce allocations, simplifed code, faster implementation, included tests - StreamInfo.ToUrl (#9369)
* Rework PR 6168 * Fix test
Diffstat (limited to 'Jellyfin.Api')
-rw-r--r--Jellyfin.Api/Helpers/MediaInfoHelper.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Jellyfin.Api/Helpers/MediaInfoHelper.cs b/Jellyfin.Api/Helpers/MediaInfoHelper.cs
index 7b493d3fa..63c9c173b 100644
--- a/Jellyfin.Api/Helpers/MediaInfoHelper.cs
+++ b/Jellyfin.Api/Helpers/MediaInfoHelper.cs
@@ -290,9 +290,7 @@ public class MediaInfoHelper
mediaSource.SupportsDirectPlay = false;
mediaSource.SupportsDirectStream = false;
- mediaSource.TranscodingUrl = streamInfo.ToUrl("-", claimsPrincipal.GetToken()).TrimStart('-');
- mediaSource.TranscodingUrl += "&allowVideoStreamCopy=false";
- mediaSource.TranscodingUrl += "&allowAudioStreamCopy=false";
+ mediaSource.TranscodingUrl = streamInfo.ToUrl(null, claimsPrincipal.GetToken(), "&allowVideoStreamCopy=false&allowAudioStreamCopy=false");
mediaSource.TranscodingContainer = streamInfo.Container;
mediaSource.TranscodingSubProtocol = streamInfo.SubProtocol;
if (streamInfo.AlwaysBurnInSubtitleWhenTranscoding)
@@ -305,7 +303,7 @@ public class MediaInfoHelper
if (!mediaSource.SupportsDirectPlay && (mediaSource.SupportsTranscoding || mediaSource.SupportsDirectStream))
{
streamInfo.PlayMethod = PlayMethod.Transcode;
- mediaSource.TranscodingUrl = streamInfo.ToUrl("-", claimsPrincipal.GetToken()).TrimStart('-');
+ mediaSource.TranscodingUrl = streamInfo.ToUrl(null, claimsPrincipal.GetToken(), null);
if (!allowVideoStreamCopy)
{