mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
update image magick orientation function
This commit is contained in:
parent
3e0cfd3af3
commit
851c62a940
@ -149,7 +149,7 @@ namespace Emby.Drawing.ImageMagick
|
|||||||
|
|
||||||
var originalImageSize = new ImageSize(originalImage.CurrentImage.Width, originalImage.CurrentImage.Height);
|
var originalImageSize = new ImageSize(originalImage.CurrentImage.Width, originalImage.CurrentImage.Height);
|
||||||
|
|
||||||
if (!options.CropWhiteSpace && options.HasDefaultOptions(inputPath, originalImageSize))
|
if (!options.CropWhiteSpace && options.HasDefaultOptions(inputPath, originalImageSize) && !autoOrient)
|
||||||
{
|
{
|
||||||
// Just spit out the original file if all the options are default
|
// Just spit out the original file if all the options are default
|
||||||
return inputPath;
|
return inputPath;
|
||||||
|
@ -76,10 +76,6 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
|||||||
private Task StartStreaming(string url, TaskCompletionSource<bool> openTaskCompletionSource, CancellationToken cancellationToken)
|
private Task StartStreaming(string url, TaskCompletionSource<bool> openTaskCompletionSource, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
return Task.Run(async () =>
|
return Task.Run(async () =>
|
||||||
{
|
|
||||||
var isFirstAttempt = true;
|
|
||||||
|
|
||||||
while (!cancellationToken.IsCancellationRequested)
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -98,8 +94,6 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
|||||||
{
|
{
|
||||||
Logger.Info("Opened HDHR stream from {0}", url);
|
Logger.Info("Opened HDHR stream from {0}", url);
|
||||||
|
|
||||||
if (!cancellationToken.IsCancellationRequested)
|
|
||||||
{
|
|
||||||
Logger.Info("Beginning multicastStream.CopyUntilCancelled");
|
Logger.Info("Beginning multicastStream.CopyUntilCancelled");
|
||||||
|
|
||||||
FileSystem.CreateDirectory(FileSystem.GetDirectoryName(TempFilePath));
|
FileSystem.CreateDirectory(FileSystem.GetDirectoryName(TempFilePath));
|
||||||
@ -109,24 +103,12 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
{
|
{
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
if (isFirstAttempt)
|
Logger.ErrorException("Error copying live stream.", ex);
|
||||||
{
|
|
||||||
Logger.ErrorException("Error opening live stream:", ex);
|
|
||||||
openTaskCompletionSource.TrySetException(ex);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.ErrorException("Error copying live stream, will reopen", ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
isFirstAttempt = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_liveStreamTaskCompletionSource.TrySetResult(true);
|
_liveStreamTaskCompletionSource.TrySetResult(true);
|
||||||
|
@ -1638,7 +1638,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
|
|
||||||
if (state.InputProtocol == MediaProtocol.Rtsp)
|
if (state.InputProtocol == MediaProtocol.Rtsp)
|
||||||
{
|
{
|
||||||
inputModifier += " -rtsp_transport tcp";
|
inputModifier += " -rtsp_transport tcp -rtsp_transport udp -rtsp_flags prefer_tcp";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(state.InputAudioSync))
|
if (!string.IsNullOrEmpty(state.InputAudioSync))
|
||||||
|
@ -517,21 +517,11 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (libraryOptions.DownloadImagesInAdvance)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.LocationType == LocationType.Remote || item.LocationType == LocationType.Virtual)
|
if (item.LocationType == LocationType.Remote || item.LocationType == LocationType.Virtual)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!item.IsSaveLocalMetadataEnabled())
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item is IItemByName && !(item is MusicArtist))
|
if (item is IItemByName && !(item is MusicArtist))
|
||||||
{
|
{
|
||||||
var hasDualAccess = item as IHasDualAccess;
|
var hasDualAccess = item as IHasDualAccess;
|
||||||
@ -541,13 +531,17 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (type)
|
if (libraryOptions.DownloadImagesInAdvance)
|
||||||
{
|
{
|
||||||
case ImageType.Primary:
|
return false;
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if (!item.IsSaveLocalMetadataEnabled())
|
||||||
|
//{
|
||||||
|
// return true;
|
||||||
|
//}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveImageStub(IHasMetadata item, ImageType imageType, IEnumerable<string> urls)
|
private void SaveImageStub(IHasMetadata item, ImageType imageType, IEnumerable<string> urls)
|
||||||
|
Loading…
Reference in New Issue
Block a user