The Free Software Media System - Server Backend & API
update dialogs
Luke Pulverenti4e0adb17e74a
diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.csindex 0862e3eaf9..04268bcea4 100644--- a/MediaBrowser.Controller/Library/ILibraryManager.cs+++ b/MediaBrowser.Controller/Library/ILibraryManager.cs@@ -566,5 +566,8 @@ namespace MediaBrowser.Controller.LibraryQueryResult<Tuple<BaseItem, ItemCounts>> GetArtists(InternalItemsQuery query);QueryResult<Tuple<BaseItem, ItemCounts>> GetAlbumArtists(InternalItemsQuery query);QueryResult<Tuple<BaseItem, ItemCounts>> GetAllArtists(InternalItemsQuery query);++ void RegisterIgnoredPath(string path);+ void UnRegisterIgnoredPath(string path);}}\ No newline at end of filediff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.csindex 5d556e3a68..7758d690aa 100644--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs@@ -621,9 +621,38 @@ namespace MediaBrowser.Server.Implementations.Libraryreturn ResolveItem(args, resolvers);}+ private readonly List<string> _ignoredPaths = new List<string>();++ public void RegisterIgnoredPath(string path)+ {+ lock (_ignoredPaths)+ {+ _ignoredPaths.Add(path);+ }+ }+ public void UnRegisterIgnoredPath(string path)+ {+ lock (_ignoredPaths)+ {+ _ignoredPaths.Remove(path);+ }+ }+public bool IgnoreFile(FileSystemMetadata file, BaseItem parent){- return EntityResolutionIgnoreRules.Any(r => r.ShouldIgnore(file, parent));+ if (EntityResolutionIgnoreRules.Any(r => r.ShouldIgnore(file, parent)))+ {+ return true;+ }++ //lock (_ignoredPaths)+ {+ if (_ignoredPaths.Contains(file.FullName, StringComparer.OrdinalIgnoreCase))+ {+ return true;+ }+ }+ return false;}public IEnumerable<FileSystemMetadata> NormalizeRootPathList(IEnumerable<FileSystemMetadata> paths)diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.csindex 8f5b42df06..8fa34109d2 100644--- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs+++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs@@ -993,6 +993,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTVrecordPath = recorder.GetOutputPath(mediaStreamInfo, recordPath);recordPath = EnsureFileUnique(recordPath, timer.Id);+ _libraryManager.RegisterIgnoredPath(recordPath);_libraryMonitor.ReportFileSystemChangeBeginning(recordPath);_fileSystem.CreateDirectory(Path.GetDirectoryName(recordPath));activeRecordingInfo.Path = recordPath;@@ -1044,6 +1045,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTVsemaphore.Release();}+ _libraryManager.UnRegisterIgnoredPath(recordPath);_libraryMonitor.ReportFileSystemChangeComplete(recordPath, true);ActiveRecordingInfo removed;diff --git a/MediaBrowser.Server.Startup.Common/Migrations/UpdateLevelMigration.cs b/MediaBrowser.Server.Startup.Common/Migrations/UpdateLevelMigration.csindex de898e66cb..d5fe9707c8 100644--- a/MediaBrowser.Server.Startup.Common/Migrations/UpdateLevelMigration.cs+++ b/MediaBrowser.Server.Startup.Common/Migrations/UpdateLevelMigration.cs@@ -42,12 +42,6 @@ namespace MediaBrowser.Server.Startup.Common.Migrations{var updateLevel = _config.Configuration.SystemUpdateLevel;- if (updateLevel == PackageVersionClass.Dev)- {- // It's already dev, there's nothing to check- return;- }-await CheckVersion(currentVersion, updateLevel, CancellationToken.None).ConfigureAwait(false);}catch