From cf64c404135381a5e56d386003eb245386428756 Mon Sep 17 00:00:00 2001 From: softworkz Date: Mon, 22 Aug 2016 23:52:54 +0200 Subject: [PATCH 01/12] AutoorganizeLog: Fixed error when log empty; re-introduced full reload on task completion --- .../ScheduledTasks/ScheduledTaskWorker.cs | 11 ------- .../FileOrganizationNotifier.cs | 30 +++++++++++++------ 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs index dcd3a3025e..ab2aa761b5 100644 --- a/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs +++ b/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs @@ -429,17 +429,6 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks GC.Collect(2, GCCollectionMode.Forced, true); } - /// - /// Executes the task. - /// - /// The cancellation token. - /// The progress. - /// Task. - private Task ExecuteTask(CancellationToken cancellationToken, IProgress progress) - { - return Task.Run(async () => await ScheduledTask.Execute(cancellationToken, progress).ConfigureAwait(false), cancellationToken); - } - /// /// Progress_s the progress changed. /// diff --git a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs b/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs index 38b90647c1..a81584082e 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs +++ b/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs @@ -1,14 +1,11 @@ -using MediaBrowser.Controller.FileOrganization; +using MediaBrowser.Common.ScheduledTasks; +using MediaBrowser.Controller.FileOrganization; using MediaBrowser.Controller.Plugins; -using MediaBrowser.Model.Logging; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using MediaBrowser.Controller.Session; using MediaBrowser.Model.Events; using MediaBrowser.Model.FileOrganization; -using MediaBrowser.Controller.Session; +using MediaBrowser.Model.Logging; +using System; using System.Threading; namespace MediaBrowser.Server.Implementations.FileOrganization @@ -20,11 +17,13 @@ namespace MediaBrowser.Server.Implementations.FileOrganization { private readonly IFileOrganizationService _organizationService; private readonly ISessionManager _sessionManager; + private readonly ITaskManager _taskManager; - public FileOrganizationNotifier(ILogger logger, IFileOrganizationService organizationService, ISessionManager sessionManager) + public FileOrganizationNotifier(ILogger logger, IFileOrganizationService organizationService, ISessionManager sessionManager, ITaskManager taskManager) { _organizationService = organizationService; _sessionManager = sessionManager; + _taskManager = taskManager; } public void Run() @@ -33,6 +32,8 @@ namespace MediaBrowser.Server.Implementations.FileOrganization _organizationService.ItemRemoved += _organizationService_ItemRemoved; _organizationService.ItemUpdated += _organizationService_ItemUpdated; _organizationService.LogReset += _organizationService_LogReset; + + _taskManager.TaskCompleted += _taskManager_TaskCompleted; } private void _organizationService_LogReset(object sender, EventArgs e) @@ -55,12 +56,23 @@ namespace MediaBrowser.Server.Implementations.FileOrganization _sessionManager.SendMessageToAdminSessions("AutoOrganizeUpdate", (FileOrganizationResult)null, CancellationToken.None); } + private void _taskManager_TaskCompleted(object sender, TaskCompletionEventArgs e) + { + var taskWithKey = e.Task.ScheduledTask as IHasKey; + if (taskWithKey != null && taskWithKey.Key == "AutoOrganize") + { + _sessionManager.SendMessageToAdminSessions("AutoOrganizeUpdate", (FileOrganizationResult)null, CancellationToken.None); + } + } + public void Dispose() { _organizationService.ItemAdded -= _organizationService_ItemAdded; _organizationService.ItemRemoved -= _organizationService_ItemRemoved; _organizationService.ItemUpdated -= _organizationService_ItemUpdated; _organizationService.LogReset -= _organizationService_LogReset; + + _taskManager.TaskCompleted -= _taskManager_TaskCompleted; } From 803a96cb4e6e2643f683f43c4dd9bbf6c2cc0f68 Mon Sep 17 00:00:00 2001 From: softworkz Date: Tue, 23 Aug 2016 05:35:59 +0200 Subject: [PATCH 02/12] AutoOrganize: Differentiate server events --- .../FileOrganizationNotifier.cs | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs b/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs index a81584082e..5c3814f669 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs +++ b/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs @@ -33,37 +33,37 @@ namespace MediaBrowser.Server.Implementations.FileOrganization _organizationService.ItemUpdated += _organizationService_ItemUpdated; _organizationService.LogReset += _organizationService_LogReset; - _taskManager.TaskCompleted += _taskManager_TaskCompleted; + //_taskManager.TaskCompleted += _taskManager_TaskCompleted; } private void _organizationService_LogReset(object sender, EventArgs e) { - _sessionManager.SendMessageToAdminSessions("AutoOrganizeUpdate", (FileOrganizationResult)null, CancellationToken.None); + _sessionManager.SendMessageToAdminSessions("AutoOrganize_LogReset", (FileOrganizationResult)null, CancellationToken.None); } private void _organizationService_ItemUpdated(object sender, GenericEventArgs e) { - _sessionManager.SendMessageToAdminSessions("AutoOrganizeUpdate", e.Argument, CancellationToken.None); + _sessionManager.SendMessageToAdminSessions("AutoOrganize_ItemUpdated", e.Argument, CancellationToken.None); } private void _organizationService_ItemRemoved(object sender, GenericEventArgs e) { - _sessionManager.SendMessageToAdminSessions("AutoOrganizeUpdate", (FileOrganizationResult)null, CancellationToken.None); + _sessionManager.SendMessageToAdminSessions("AutoOrganize_ItemRemoved", e.Argument, CancellationToken.None); } private void _organizationService_ItemAdded(object sender, GenericEventArgs e) { - _sessionManager.SendMessageToAdminSessions("AutoOrganizeUpdate", (FileOrganizationResult)null, CancellationToken.None); + _sessionManager.SendMessageToAdminSessions("AutoOrganize_ItemAdded", e.Argument, CancellationToken.None); } - private void _taskManager_TaskCompleted(object sender, TaskCompletionEventArgs e) - { - var taskWithKey = e.Task.ScheduledTask as IHasKey; - if (taskWithKey != null && taskWithKey.Key == "AutoOrganize") - { - _sessionManager.SendMessageToAdminSessions("AutoOrganizeUpdate", (FileOrganizationResult)null, CancellationToken.None); - } - } + //private void _taskManager_TaskCompleted(object sender, TaskCompletionEventArgs e) + //{ + // var taskWithKey = e.Task.ScheduledTask as IHasKey; + // if (taskWithKey != null && taskWithKey.Key == "AutoOrganize") + // { + // _sessionManager.SendMessageToAdminSessions("AutoOrganize_TaskCompleted", (FileOrganizationResult)null, CancellationToken.None); + // } + //} public void Dispose() { @@ -72,7 +72,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization _organizationService.ItemUpdated -= _organizationService_ItemUpdated; _organizationService.LogReset -= _organizationService_LogReset; - _taskManager.TaskCompleted -= _taskManager_TaskCompleted; + //_taskManager.TaskCompleted -= _taskManager_TaskCompleted; } From 3785298dd9a1d908dae133b9e1b4db977b7bc491 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 28 Aug 2016 12:26:37 -0400 Subject: [PATCH 03/12] restore version --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index baf48338ed..3a703bb6f8 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,4 +1,4 @@ using System.Reflection; //[assembly: AssemblyVersion("3.1.*")] -[assembly: AssemblyVersion("3.0.6300")] +[assembly: AssemblyVersion("3.1.126")] From 5543a556a8af7f466b22dccf5368662695781ab9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 28 Aug 2016 12:40:02 -0400 Subject: [PATCH 04/12] restore version --- SharedVersion.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index baf48338ed..ded2038b03 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,4 +1,4 @@ using System.Reflection; -//[assembly: AssemblyVersion("3.1.*")] -[assembly: AssemblyVersion("3.0.6300")] +[assembly: AssemblyVersion("3.1.*")] +//[assembly: AssemblyVersion("3.0.6060")] From 806c7950692d194d7b3a4e5be35eede60f44187b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 28 Aug 2016 12:46:28 -0400 Subject: [PATCH 05/12] update episode nfo saving --- .../MediaEncoder/EncodingManager.cs | 9 ++++++++- .../Savers/EpisodeNfoSaver.cs | 18 +++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs b/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs index 46ba7d2e74..67ddcc5cc0 100644 --- a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs +++ b/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs @@ -123,10 +123,17 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder { if (extractImages) { - if (video.VideoType == VideoType.HdDvd || video.VideoType == VideoType.Iso || video.VideoType == VideoType.BluRay || video.VideoType == VideoType.Dvd) + if (video.VideoType == VideoType.HdDvd || video.VideoType == VideoType.Iso) { continue; } + if (video.VideoType == VideoType.BluRay || video.VideoType == VideoType.Dvd) + { + if (video.PlayableStreamFileNames.Count != 1) + { + continue; + } + } // Add some time for the first chapter to make sure we don't end up with a black image var time = chapter.StartPositionTicks == 0 ? TimeSpan.FromTicks(Math.Min(FirstChapterTicks, video.RunTimeTicks ?? 0)) : TimeSpan.FromTicks(chapter.StartPositionTicks); diff --git a/MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs b/MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs index bf6df2347f..d57d22d5c4 100644 --- a/MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs +++ b/MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs @@ -72,19 +72,23 @@ namespace MediaBrowser.XbmcMetadata.Savers { writer.WriteElementString("airsbefore_episode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture)); } - if (episode.AirsBeforeEpisodeNumber.HasValue && episode.AirsBeforeEpisodeNumber.Value != -1) - { - writer.WriteElementString("displayepisode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture)); - } if (episode.AirsBeforeSeasonNumber.HasValue && episode.AirsBeforeSeasonNumber.Value != -1) { writer.WriteElementString("airsbefore_season", episode.AirsBeforeSeasonNumber.Value.ToString(UsCulture)); } - var season = episode.AiredSeasonNumber; - if (season.HasValue && season.Value != -1) + if (episode.ParentIndexNumber.HasValue && episode.ParentIndexNumber.Value == 0) { - writer.WriteElementString("displayseason", season.Value.ToString(UsCulture)); + if (episode.AirsBeforeEpisodeNumber.HasValue && episode.AirsBeforeEpisodeNumber.Value != -1) + { + writer.WriteElementString("displayepisode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture)); + } + + var specialSeason = episode.AiredSeasonNumber; + if (specialSeason.HasValue && specialSeason.Value != -1) + { + writer.WriteElementString("displayseason", specialSeason.Value.ToString(UsCulture)); + } } if (episode.DvdEpisodeNumber.HasValue) From dc9742a2ed4e36108721f7dd7776da939c97563d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 28 Aug 2016 12:57:59 -0400 Subject: [PATCH 06/12] comment out code not compiling --- .../LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs index 1e44877572..ba5c604ed0 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs @@ -284,19 +284,19 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.SatIp var capabilitiesElement = deviceElement.Element(n1 + "X_SATIPCAP"); if (capabilitiesElement != null) { - _capabilities = capabilitiesElement.Value; - if (capabilitiesElement.Value.Contains(',')) - { - string[] capabilities = capabilitiesElement.Value.Split(','); - foreach (var capability in capabilities) - { - ReadCapability(capability); - } - } - else - { - ReadCapability(capabilitiesElement.Value); - } + //_capabilities = capabilitiesElement.Value; + //if (capabilitiesElement.Value.Contains(',')) + //{ + // string[] capabilities = capabilitiesElement.Value.Split(','); + // foreach (var capability in capabilities) + // { + // ReadCapability(capability); + // } + //} + //else + //{ + // ReadCapability(capabilitiesElement.Value); + //} } else { From 30f30ae9f3ba32dd02b89dcc03a9066616717f26 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 28 Aug 2016 14:59:14 -0400 Subject: [PATCH 07/12] update shared components --- Nuget/MediaBrowser.Common.Internal.nuspec | 4 ++-- Nuget/MediaBrowser.Common.nuspec | 2 +- Nuget/MediaBrowser.Server.Core.nuspec | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec index d1c4c0b449..cfdfc7ef0b 100644 --- a/Nuget/MediaBrowser.Common.Internal.nuspec +++ b/Nuget/MediaBrowser.Common.Internal.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common.Internal - 3.0.655 + 3.0.656 MediaBrowser.Common.Internal Luke ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains common components shared by Emby Theater and Emby Server. Not intended for plugin developer consumption. Copyright © Emby 2013 - + diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index ffee84de2e..1ebf4d0529 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common - 3.0.655 + 3.0.656 MediaBrowser.Common Emby Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index 73c51ca355..630ff8fd2b 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Server.Core - 3.0.655 + 3.0.656 Media Browser.Server.Core Emby Team ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains core components required to build plugins for Emby Server. Copyright © Emby 2013 - + From 21a8dc77c322949339562526d6acbd02f9ece32f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 28 Aug 2016 15:45:17 -0400 Subject: [PATCH 08/12] fix merge conflict --- SharedVersion.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index 3a703bb6f8..ded2038b03 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,4 +1,4 @@ using System.Reflection; -//[assembly: AssemblyVersion("3.1.*")] -[assembly: AssemblyVersion("3.1.126")] +[assembly: AssemblyVersion("3.1.*")] +//[assembly: AssemblyVersion("3.0.6060")] From 70234149eba173091a44b7383650de19c5558b9e Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 28 Aug 2016 15:45:53 -0400 Subject: [PATCH 09/12] 3.1.127 --- SharedVersion.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index ded2038b03..52652dd3f9 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,4 +1,4 @@ using System.Reflection; -[assembly: AssemblyVersion("3.1.*")] -//[assembly: AssemblyVersion("3.0.6060")] +//[assembly: AssemblyVersion("3.1.*")] +[assembly: AssemblyVersion("3.1.127")] From f0864b1dae70f31f8e911e2994a07421753361c4 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 29 Aug 2016 03:12:34 -0400 Subject: [PATCH 10/12] update intros --- .../Intros/DefaultIntroProvider.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs index 7c7a535cd7..4a43befede 100644 --- a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs +++ b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs @@ -216,7 +216,8 @@ namespace MediaBrowser.Server.Implementations.Intros } return allIntros - .Where(i => IsMatch(i.Path, codec)); + .Where(i => IsMatch(i.Path, codec)) + .OrderBy(i => Guid.NewGuid()); } private IEnumerable GetMediaInfoIntrosByAudioStream(List allIntros, MediaStream stream) @@ -229,13 +230,15 @@ namespace MediaBrowser.Server.Implementations.Intros } return allIntros - .Where(i => IsAudioMatch(i.Path, stream)); + .Where(i => IsAudioMatch(i.Path, stream)) + .OrderBy(i => Guid.NewGuid()); } private IEnumerable GetMediaInfoIntrosByTags(List allIntros, List tags) { return allIntros - .Where(i => tags.Any(t => IsMatch(i.Path, t))); + .Where(i => tags.Any(t => IsMatch(i.Path, t))) + .OrderBy(i => Guid.NewGuid()); } private bool IsMatch(string file, string attribute) From 06ebf9d3c262d64d3d1aa967c7893ae32a4fb191 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 29 Aug 2016 14:42:53 -0400 Subject: [PATCH 11/12] update recording file name --- .../ScheduledTasks/ScheduledTaskWorker.cs | 4 -- .../Configuration/ServerConfiguration.cs | 2 - .../Manager/MetadataService.cs | 15 ------- .../Library/LibraryManager.cs | 4 -- .../Library/Validators/PeopleValidator.cs | 4 -- .../LiveTv/EmbyTV/RecordingHelper.cs | 4 ++ .../ApplicationHost.cs | 3 +- .../MediaBrowser.Server.Startup.Common.csproj | 1 - .../Migrations/CollectionsViewMigration.cs | 40 ------------------- 9 files changed, 5 insertions(+), 72 deletions(-) delete mode 100644 MediaBrowser.Server.Startup.Common/Migrations/CollectionsViewMigration.cs diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs index ab2aa761b5..798e18ef59 100644 --- a/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs +++ b/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs @@ -423,10 +423,6 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks CurrentProgress = null; OnTaskCompleted(startTime, endTime, status, failureException); - - // Bad practice, i know. But we keep a lot in memory, unfortunately. - GC.Collect(2, GCCollectionMode.Forced, true); - GC.Collect(2, GCCollectionMode.Forced, true); } /// diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index a891a422a5..abe572cc8e 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -176,7 +176,6 @@ namespace MediaBrowser.Model.Configuration public string UICulture { get; set; } public PeopleMetadataOptions PeopleMetadataOptions { get; set; } - public bool FindInternetTrailers { get; set; } public bool SaveMetadataHidden { get; set; } @@ -243,7 +242,6 @@ namespace MediaBrowser.Model.Configuration LibraryMonitorDelay = 60; EnableInternetProviders = true; - FindInternetTrailers = true; PathSubstitutions = new PathSubstitution[] { }; ContentTypes = new NameValuePair[] { }; diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.cs index c535f33baf..a610df4270 100644 --- a/MediaBrowser.Providers/Manager/MetadataService.cs +++ b/MediaBrowser.Providers/Manager/MetadataService.cs @@ -647,8 +647,6 @@ namespace MediaBrowser.Providers.Manager if (result.HasMetadata) { - NormalizeRemoteResult(result.Item); - MergeData(result, temp, new List(), false, false); refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataDownload; @@ -673,19 +671,6 @@ namespace MediaBrowser.Providers.Manager return refreshResult; } - private void NormalizeRemoteResult(TItemType item) - { - if (!ServerConfigurationManager.Configuration.FindInternetTrailers) - { - var hasTrailers = item as IHasTrailers; - - if (hasTrailers != null) - { - hasTrailers.RemoteTrailers.Clear(); - } - } - } - private void MergeNewData(TItemType source, TIdType lookupInfo) { // Copy new provider id's that may have been obtained diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index cc3a7e41f8..5d556e3a68 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -1088,10 +1088,6 @@ namespace MediaBrowser.Server.Implementations.Library await RunPostScanTasks(innerProgress, cancellationToken).ConfigureAwait(false); progress.Report(100); - - // Bad practice, i know. But we keep a lot in memory, unfortunately. - GC.Collect(2, GCCollectionMode.Forced, true); - GC.Collect(2, GCCollectionMode.Forced, true); } /// diff --git a/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs index d90b9615ba..93b9c0da1e 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs +++ b/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs @@ -165,10 +165,6 @@ namespace MediaBrowser.Server.Implementations.Library.Validators progress.Report(100); _logger.Info("People validation complete"); - - // Bad practice, i know. But we keep a lot in memory, unfortunately. - GC.Collect(2, GCCollectionMode.Forced, true); - GC.Collect(2, GCCollectionMode.Forced, true); } } } diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs index 37e10d9255..9485e0325d 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs @@ -55,6 +55,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV { name += " " + info.OriginalAirDate.Value.ToString("yyyy-MM-dd"); } + else + { + name += " " + DateTime.Now.ToString("yyyy-MM-dd"); + } if (!string.IsNullOrWhiteSpace(info.EpisodeTitle)) { diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index 9c5015b0ec..ac2422b088 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -385,8 +385,7 @@ namespace MediaBrowser.Server.Startup.Common new OmdbEpisodeProviderMigration(ServerConfigurationManager), new MovieDbEpisodeProviderMigration(ServerConfigurationManager), new DbMigration(ServerConfigurationManager, TaskManager), - new UpdateLevelMigration(ServerConfigurationManager, this, HttpClient, JsonSerializer, _releaseAssetFilename), - new CollectionsViewMigration(ServerConfigurationManager, UserManager) + new UpdateLevelMigration(ServerConfigurationManager, this, HttpClient, JsonSerializer, _releaseAssetFilename) }; foreach (var task in migrations) diff --git a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj index 5ee7d49e86..c415dec8af 100644 --- a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj +++ b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj @@ -70,7 +70,6 @@ - diff --git a/MediaBrowser.Server.Startup.Common/Migrations/CollectionsViewMigration.cs b/MediaBrowser.Server.Startup.Common/Migrations/CollectionsViewMigration.cs deleted file mode 100644 index 3f68ec48b3..0000000000 --- a/MediaBrowser.Server.Startup.Common/Migrations/CollectionsViewMigration.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Linq; -using MediaBrowser.Controller.Configuration; -using MediaBrowser.Controller.Library; - -namespace MediaBrowser.Server.Startup.Common.Migrations -{ - public class CollectionsViewMigration : IVersionMigration - { - private readonly IServerConfigurationManager _config; - private readonly IUserManager _userManager; - - public CollectionsViewMigration(IServerConfigurationManager config, IUserManager userManager) - { - _config = config; - _userManager = userManager; - } - - public void Run() - { - var migrationKey = this.GetType().Name; - var migrationKeyList = _config.Configuration.Migrations.ToList(); - - if (!migrationKeyList.Contains(migrationKey)) - { - if (_config.Configuration.IsStartupWizardCompleted) - { - if (_userManager.Users.Any(i => i.Configuration.DisplayCollectionsView)) - { - _config.Configuration.DisplayCollectionsView = true; - } - } - - migrationKeyList.Add(migrationKey); - _config.Configuration.Migrations = migrationKeyList.ToArray(); - _config.SaveConfiguration(); - } - - } - } -} From 416e175901052af2b253d56519a2e44a78b3ce26 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 29 Aug 2016 14:44:19 -0400 Subject: [PATCH 12/12] 3.1.128 --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index 52652dd3f9..19a0556704 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,4 +1,4 @@ using System.Reflection; //[assembly: AssemblyVersion("3.1.*")] -[assembly: AssemblyVersion("3.1.127")] +[assembly: AssemblyVersion("3.1.128")]