safari image fix
This commit is contained in:
parent
41a63028f1
commit
b54b906c1a
|
@ -119,12 +119,13 @@ namespace Emby.Drawing.ImageMagick
|
||||||
{
|
{
|
||||||
var ext = Path.GetExtension(path);
|
var ext = Path.GetExtension(path);
|
||||||
|
|
||||||
return string.Equals(ext, ".png", StringComparison.OrdinalIgnoreCase);
|
return string.Equals(ext, ".png", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
string.Equals(ext, ".webp", StringComparison.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EncodeImage(string inputPath, string outputPath, int width, int height, int quality, ImageProcessingOptions options)
|
public void EncodeImage(string inputPath, string outputPath, int width, int height, int quality, ImageProcessingOptions options)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(options.BackgroundColor) && !HasTransparency(inputPath))
|
if (string.IsNullOrWhiteSpace(options.BackgroundColor) || !HasTransparency(inputPath))
|
||||||
{
|
{
|
||||||
using (var originalImage = new MagickWand(inputPath))
|
using (var originalImage = new MagickWand(inputPath))
|
||||||
{
|
{
|
||||||
|
|
|
@ -659,8 +659,10 @@ namespace MediaBrowser.Api.Images
|
||||||
return ImageFormat.Png;
|
return ImageFormat.Png;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.Equals(Path.GetExtension(image.Path), ".jpg", StringComparison.OrdinalIgnoreCase) ||
|
var extension = Path.GetExtension(image.Path);
|
||||||
string.Equals(Path.GetExtension(image.Path), ".jpeg", StringComparison.OrdinalIgnoreCase))
|
|
||||||
|
if (string.Equals(extension, ".jpg", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
string.Equals(extension, ".jpeg", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return ImageFormat.Jpg;
|
return ImageFormat.Jpg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -771,7 +771,7 @@ namespace MediaBrowser.Dlna.PlayTo
|
||||||
if (newItem.StreamInfo.IsDirectStream && newPosition > 0)
|
if (newItem.StreamInfo.IsDirectStream && newPosition > 0)
|
||||||
{
|
{
|
||||||
// This is rather arbitrary, but give the player time to start playing
|
// This is rather arbitrary, but give the player time to start playing
|
||||||
await Task.Delay(2000).ConfigureAwait(false);
|
await Task.Delay(5000).ConfigureAwait(false);
|
||||||
|
|
||||||
await _device.Seek(TimeSpan.FromTicks(newPosition)).ConfigureAwait(false);
|
await _device.Seek(TimeSpan.FromTicks(newPosition)).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user