diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 9c69cc0fcf..7f893d8f7d 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1590,14 +1590,10 @@ namespace Emby.Server.Implementations /// Task{CheckForUpdateResult}. public override async Task CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress progress) { - var cacheLength = TimeSpan.FromHours(3); + var cacheLength = TimeSpan.FromHours(1); var updateLevel = SystemUpdateLevel; - if (updateLevel == PackageVersionClass.Beta) - { - cacheLength = TimeSpan.FromHours(1); - } - else if (updateLevel == PackageVersionClass.Dev) + if (updateLevel != PackageVersionClass.Release) { cacheLength = TimeSpan.FromMinutes(5); } diff --git a/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs b/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs index f43e45441c..37ba2eb5fe 100644 --- a/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs +++ b/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs @@ -11,9 +11,6 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Common.Configuration; using MediaBrowser.Model.IO; -using MediaBrowser.Controller.Channels; -using MediaBrowser.Controller.Entities.Audio; -using MediaBrowser.Model.Tasks; namespace Emby.Server.Implementations.Data { @@ -34,31 +31,9 @@ namespace Emby.Server.Implementations.Data _appPaths = appPaths; } - public string Name + public Task Run(IProgress progress, CancellationToken cancellationToken) { - get { return "Clean Database"; } - } - - public string Description - { - get { return "Deletes obsolete content from the database."; } - } - - public string Category - { - get { return "Library"; } - } - - public async Task Run(IProgress progress, CancellationToken cancellationToken) - { - // Ensure these objects are lazy loaded. - // Without this there is a deadlock that will need to be investigated - var rootChildren = _libraryManager.RootFolder.Children.ToList(); - rootChildren = _libraryManager.GetUserRootFolder().Children.ToList(); - - await CleanDeadItems(cancellationToken, progress).ConfigureAwait(false); - - //await _itemRepo.UpdateInheritedValues(cancellationToken).ConfigureAwait(false); + return CleanDeadItems(cancellationToken, progress); } private async Task CleanDeadItems(CancellationToken cancellationToken, IProgress progress) @@ -98,23 +73,5 @@ namespace Emby.Server.Implementations.Data progress.Report(100); } - - /// - /// Creates the triggers that define when the task will run - /// - /// IEnumerable{BaseTaskTrigger}. - public IEnumerable GetDefaultTriggers() - { - return new[] { - - // Every so often - new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks} - }; - } - - public string Key - { - get { return "CleanDatabase"; } - } } } \ No newline at end of file diff --git a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs index a5387a2657..6ba9577d17 100644 --- a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs +++ b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs @@ -116,7 +116,7 @@ namespace MediaBrowser.Controller.Entities.Movies { if (IsLegacyBoxSet) { - return true; + return false; } return false; diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 1f85a076e5..e0153f878e 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -1788,8 +1788,7 @@ namespace MediaBrowser.Controller.MediaEncoding if (videoStream != null && !string.IsNullOrWhiteSpace(videoStream.Codec) && - !string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType) && - encodingOptions.EnableHardwareDecoding) + !string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType)) { if (string.Equals(encodingOptions.HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase)) { @@ -1797,7 +1796,7 @@ namespace MediaBrowser.Controller.MediaEncoding { case "avc": case "h264": - if (_mediaEncoder.SupportsDecoder("h264_qsv")) + if (_mediaEncoder.SupportsDecoder("h264_qsv") && encodingOptions.HardwareDecodingCodecs.Contains("h264", StringComparer.OrdinalIgnoreCase)) { // qsv decoder does not support 10-bit input if ((videoStream.BitDepth ?? 8) > 8) @@ -1807,21 +1806,21 @@ namespace MediaBrowser.Controller.MediaEncoding return "-c:v h264_qsv "; } break; - //case "hevc": - //case "h265": - // if (_mediaEncoder.SupportsDecoder("hevc_qsv")) - // { - // return "-c:v hevc_qsv "; - // } - // break; + case "hevc": + case "h265": + if (_mediaEncoder.SupportsDecoder("hevc_qsv") && encodingOptions.HardwareDecodingCodecs.Contains("hevc", StringComparer.OrdinalIgnoreCase)) + { + return "-c:v hevc_qsv "; + } + break; case "mpeg2video": - if (_mediaEncoder.SupportsDecoder("mpeg2_qsv")) + if (_mediaEncoder.SupportsDecoder("mpeg2_qsv") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg2video", StringComparer.OrdinalIgnoreCase)) { return "-c:v mpeg2_qsv "; } break; case "vc1": - if (_mediaEncoder.SupportsDecoder("vc1_qsv")) + if (_mediaEncoder.SupportsDecoder("vc1_qsv") && encodingOptions.HardwareDecodingCodecs.Contains("vc1", StringComparer.OrdinalIgnoreCase)) { return "-c:v vc1_qsv "; } @@ -1835,14 +1834,14 @@ namespace MediaBrowser.Controller.MediaEncoding { case "avc": case "h264": - if (_mediaEncoder.SupportsDecoder("h264_cuvid")) + if (_mediaEncoder.SupportsDecoder("h264_cuvid") && encodingOptions.HardwareDecodingCodecs.Contains("h264", StringComparer.OrdinalIgnoreCase)) { return "-c:v h264_cuvid "; } break; case "hevc": case "h265": - if (_mediaEncoder.SupportsDecoder("hevc_cuvid")) + if (_mediaEncoder.SupportsDecoder("hevc_cuvid") && encodingOptions.HardwareDecodingCodecs.Contains("hevc", StringComparer.OrdinalIgnoreCase)) { return "-c:v hevc_cuvid "; } diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs index e1b0514e7a..55d05418cc 100644 --- a/MediaBrowser.Model/Configuration/EncodingOptions.cs +++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs @@ -13,9 +13,10 @@ namespace MediaBrowser.Model.Configuration public string VaapiDevice { get; set; } public int H264Crf { get; set; } public string H264Preset { get; set; } - public bool EnableHardwareDecoding { get; set; } public bool EnableHardwareEncoding { get; set; } + public string[] HardwareDecodingCodecs { get; set; } + public EncodingOptions() { DownMixAudioBoost = 2; @@ -24,8 +25,9 @@ namespace MediaBrowser.Model.Configuration EncodingThreadCount = -1; VaapiDevice = "/dev/dri/card0"; H264Crf = 23; - EnableHardwareDecoding = true; EnableHardwareEncoding = true; + + HardwareDecodingCodecs = new string[] { "h264", "mpeg2video", "vc1" }; } } } diff --git a/MediaBrowser.Model/Sync/SyncJob.cs b/MediaBrowser.Model/Sync/SyncJob.cs index f0e262c501..eb153427c7 100644 --- a/MediaBrowser.Model/Sync/SyncJob.cs +++ b/MediaBrowser.Model/Sync/SyncJob.cs @@ -105,12 +105,9 @@ namespace MediaBrowser.Model.Sync public string PrimaryImageItemId { get; set; } public string PrimaryImageTag { get; set; } - public bool EnableAutomaticResync { get; set; } - public SyncJob() { RequestedItemIds = new List(); - EnableAutomaticResync = true; } } } diff --git a/SharedVersion.cs b/SharedVersion.cs index 25d498a60c..647892115e 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.26.22")] +[assembly: AssemblyVersion("3.2.26.23")]