mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
Address review comments
Clean up style Fix references in class summaries Combine Where+FirstOrDefault queries Break up large method, long lines Add validation on file extension Apply test naming conventions Extract mock of Movie class, comment on why not mocking interface Co-authored-by: Cody Robibero <cody@robibe.ro> Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
This commit is contained in:
@@ -548,6 +548,15 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
throw new ArgumentNullException(nameof(inputPath));
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(outputExtension))
|
||||
{
|
||||
outputExtension = ".jpg";
|
||||
}
|
||||
else if (outputExtension[0] != '.')
|
||||
{
|
||||
outputExtension = "." + outputExtension;
|
||||
}
|
||||
|
||||
var tempExtractPath = Path.Combine(_configurationManager.ApplicationPaths.TempDirectory, Guid.NewGuid() + outputExtension);
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(tempExtractPath));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user