mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
Use null coalescing when possible
This commit is contained in:
@@ -135,12 +135,8 @@ namespace Jellyfin.Api.Controllers
|
||||
var playlistPath = _fileSystem.GetFilePaths(transcodeFolderPath)
|
||||
.FirstOrDefault(i =>
|
||||
string.Equals(Path.GetExtension(i), ".m3u8", StringComparison.OrdinalIgnoreCase)
|
||||
&& i.IndexOf(normalizedPlaylistId, StringComparison.OrdinalIgnoreCase) != -1);
|
||||
|
||||
if (playlistPath == null)
|
||||
{
|
||||
throw new ResourceNotFoundException(nameof(playlistPath));
|
||||
}
|
||||
&& i.IndexOf(normalizedPlaylistId, StringComparison.OrdinalIgnoreCase) != -1)
|
||||
?? throw new ResourceNotFoundException(nameof(transcodeFolderPath));
|
||||
|
||||
return GetFileResult(file, playlistPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user