aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-02-17 00:26:03 +0100
committerShadowghost <Ghost_of_Stone@web.de>2023-03-10 15:27:17 +0100
commit47aa07c3424ce0041e0a79eea1ab7f6621485b94 (patch)
tree70884688c8d88032f9e573ec1478fa492eab6c90
parentcd852d43c16f0e038ba547053bd4c80794ba990c (diff)
Fix DLNA playback of DVD and BD folders
-rw-r--r--Jellyfin.Api/Helpers/TranscodingJobHelper.cs8
-rw-r--r--MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs13
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs6
3 files changed, 22 insertions, 5 deletions
diff --git a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs
index 3bb3ad358..ee210117e 100644
--- a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs
+++ b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs
@@ -325,8 +325,12 @@ public class TranscodingJobHelper : IDisposable
await DeletePartialStreamFiles(job.Path!, job.Type, 0, 1500).ConfigureAwait(false);
if (job.MediaSource?.VideoType == VideoType.Dvd || job.MediaSource?.VideoType == VideoType.BluRay)
{
- var path = Path.Join(job.Path, job.MediaSource.Id + ".concat");
- File.Delete(path);
+ var concatFilePath = Path.Join(_serverConfigurationManager.GetTranscodePath(), job.MediaSource.Id + ".concat");
+ if (File.Exists(concatFilePath))
+ {
+ _logger.LogInformation("Deleting ffmpeg concat configuration at {Path}", concatFilePath);
+ _fileSystem.DeleteFile(concatFilePath);
+ }
}
}
diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
index 99310a75d..dc15e169f 100644
--- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
+++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
@@ -251,12 +251,23 @@ namespace MediaBrowser.MediaEncoding.Probing
return null;
}
+ // Handle MPEG-1 container
if (string.Equals(format, "mpegvideo", StringComparison.OrdinalIgnoreCase))
{
return "mpeg";
}
- format = format.Replace("matroska", "mkv", StringComparison.OrdinalIgnoreCase);
+ // Handle MPEG-2 container
+ if (string.Equals(format, "mpeg", StringComparison.OrdinalIgnoreCase))
+ {
+ return "ts";
+ }
+
+ // Handle matroska container
+ if (string.Equals(format, "matroska", StringComparison.OrdinalIgnoreCase))
+ {
+ return "mkv";
+ }
return format;
}
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index 3b5509907..fdf3afe97 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -108,8 +108,10 @@ namespace MediaBrowser.Model.Dlna
public string MediaSourceId => MediaSource?.Id;
public bool IsDirectStream =>
- PlayMethod == PlayMethod.DirectStream ||
- PlayMethod == PlayMethod.DirectPlay;
+ !(MediaSource?.VideoType == VideoType.Dvd
+ || MediaSource?.VideoType == VideoType.BluRay)
+ && (PlayMethod == PlayMethod.DirectStream
+ || PlayMethod == PlayMethod.DirectPlay);
/// <summary>
/// Gets the audio stream that will be used.