mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 08:45:23 +03:00
Use null coalescing when possible
This commit is contained in:
@@ -362,12 +362,7 @@ namespace Jellyfin.Api.Controllers
|
||||
var threads = _encodingHelper.GetNumberOfThreads(state, _encodingOptions, videoCodec);
|
||||
var inputModifier = _encodingHelper.GetInputModifier(state, _encodingOptions);
|
||||
var format = !string.IsNullOrWhiteSpace(state.Request.SegmentContainer) ? "." + state.Request.SegmentContainer : ".ts";
|
||||
var directory = Path.GetDirectoryName(outputPath);
|
||||
if (directory == null)
|
||||
{
|
||||
throw new ResourceNotFoundException(nameof(directory));
|
||||
}
|
||||
|
||||
var directory = Path.GetDirectoryName(outputPath) ?? throw new ResourceNotFoundException(nameof(outputPath));
|
||||
var outputTsArg = Path.Combine(directory, Path.GetFileNameWithoutExtension(outputPath)) + "%d" + format;
|
||||
|
||||
var segmentFormat = format.TrimStart('.');
|
||||
|
||||
Reference in New Issue
Block a user