mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-04 07:10:45 +00:00
Jellyfin.Drawing minor improvements
Reduce duplicate/dead code
This commit is contained in:
parent
d5e86188a1
commit
c707baed83
8 changed files with 37 additions and 93 deletions
|
|
@ -650,15 +650,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
{
|
||||
ArgumentException.ThrowIfNullOrEmpty(inputPath);
|
||||
|
||||
var outputExtension = targetFormat switch
|
||||
{
|
||||
ImageFormat.Bmp => ".bmp",
|
||||
ImageFormat.Gif => ".gif",
|
||||
ImageFormat.Jpg => ".jpg",
|
||||
ImageFormat.Png => ".png",
|
||||
ImageFormat.Webp => ".webp",
|
||||
_ => ".jpg"
|
||||
};
|
||||
var outputExtension = targetFormat?.GetExtension() ?? ".jpg";
|
||||
|
||||
var tempExtractPath = Path.Combine(_configurationManager.ApplicationPaths.TempDirectory, Guid.NewGuid() + outputExtension);
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(tempExtractPath));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue