Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DVD and BD folder playback #9254

Merged
merged 12 commits into from
Mar 10, 2023
Prev Previous commit
Next Next commit
Fix DLNA playback of DVD and BD folders
  • Loading branch information
Shadowghost committed Mar 10, 2023
commit 47aa07c3424ce0041e0a79eea1ab7f6621485b94
8 changes: 6 additions & 2 deletions Jellyfin.Api/Helpers/TranscodingJobHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,12 @@ private async Task KillTranscodingJob(TranscodingJobDto job, bool closeLiveStrea
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);
Shadowghost marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

Expand Down
13 changes: 12 additions & 1 deletion MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,23 @@ private string NormalizeFormat(string format)
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;
}
Expand Down
6 changes: 4 additions & 2 deletions MediaBrowser.Model/Dlna/StreamInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ public StreamInfo()
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);
Shadowghost marked this conversation as resolved.
Show resolved Hide resolved

/// <summary>
/// Gets the audio stream that will be used.
Expand Down