docker-jellyfin-livestream/jellyfin_livestream.patch

36 lines
1.8 KiB
Diff

diff --git a/Jellyfin.Api/Helpers/StreamingHelpers.cs b/Jellyfin.Api/Helpers/StreamingHelpers.cs
index b552df0a4..ba2cdb17b 100644
--- a/Jellyfin.Api/Helpers/StreamingHelpers.cs
+++ b/Jellyfin.Api/Helpers/StreamingHelpers.cs
@@ -496,9 +496,9 @@ namespace Jellyfin.Api.Helpers
/// <returns>The complete file path, including the folder, for the transcoding file.</returns>
private static string GetOutputFilePath(StreamState state, string outputFileExtension, IServerConfigurationManager serverConfigurationManager, string? deviceId, string? playSessionId)
{
- var data = $"{state.MediaPath}-{state.UserAgent}-{deviceId!}-{playSessionId!}";
+ var data = state.MediaPath.Split('/');
- var filename = data.GetMD5().ToString("N", CultureInfo.InvariantCulture);
+ var filename = data[data.Length - 1].Split('.')[0];
var ext = outputFileExtension?.ToLowerInvariant();
var folder = serverConfigurationManager.GetTranscodePath();
diff --git a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs
index 2adb006e4..0209a3e64 100644
--- a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs
+++ b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs
@@ -323,10 +323,10 @@ namespace Jellyfin.Api.Helpers
#pragma warning restore CA1849
}
- if (delete(job.Path!))
- {
- await DeletePartialStreamFiles(job.Path!, job.Type, 0, 1500).ConfigureAwait(false);
- }
+ // if (delete(job.Path!))
+ // {
+ // await DeletePartialStreamFiles(job.Path!, job.Type, 0, 1500).ConfigureAwait(false);
+ // }
if (closeLiveStream && !string.IsNullOrWhiteSpace(job.LiveStreamId))
{