The Free Software Media System - Server Backend & API
rework subtitle editor
Luke Pulverenti29923506cada
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.csindex bb23d36640..4cdc4657e3 100644--- a/MediaBrowser.Controller/Entities/Folder.cs+++ b/MediaBrowser.Controller/Entities/Folder.cs@@ -371,7 +371,7 @@ namespace MediaBrowser.Controller.Entitiespublic Task ValidateChildren(IProgress<double> progress, CancellationToken cancellationToken){- return ValidateChildren(progress, cancellationToken, new MetadataRefreshOptions(new DirectoryService(FileSystem)));+ return ValidateChildren(progress, cancellationToken, new MetadataRefreshOptions(new DirectoryService(FileSystem)));}/// <summary>@@ -474,7 +474,7 @@ namespace MediaBrowser.Controller.EntitiescurrentChild.DateModified = child.DateModified;}- currentChild.IsOffline = false;+ await UpdateIsOffline(currentChild, false).ConfigureAwait(false);validChildren.Add(currentChild);}else@@ -509,12 +509,12 @@ namespace MediaBrowser.Controller.Entitieselse if (!string.IsNullOrEmpty(item.Path) && IsPathOffline(item.Path)){- item.IsOffline = true;+ await UpdateIsOffline(item, true).ConfigureAwait(false);validChildren.Add(item);}else{- item.IsOffline = false;+ await UpdateIsOffline(item, false).ConfigureAwait(false);actualRemovals.Add(item);}}@@ -569,6 +569,17 @@ namespace MediaBrowser.Controller.Entitiesprogress.Report(100);}+ private Task UpdateIsOffline(BaseItem item, bool newValue)+ {+ if (item.IsOffline != newValue)+ {+ item.IsOffline = newValue;+ return item.UpdateToRepository(ItemUpdateType.None, CancellationToken.None);+ }++ return Task.FromResult(true);+ }+private async Task RefreshMetadataRecursive(MetadataRefreshOptions refreshOptions, bool recursive, IProgress<double> progress, CancellationToken cancellationToken){var children = ActualChildren.ToList();@@ -693,7 +704,7 @@ namespace MediaBrowser.Controller.Entities/// <returns><c>true</c> if the specified path is offline; otherwise, <c>false</c>.</returns>private bool IsPathOffline(string path){- if (FileSystem.FileExists(path))+ if (FileSystem.FileExists(path)){return false;}@@ -703,7 +714,7 @@ namespace MediaBrowser.Controller.Entities// Depending on whether the path is local or unc, it may return either null or '\' at the topwhile (!string.IsNullOrEmpty(path) && path.Length > 1){- if (FileSystem.DirectoryExists(path))+ if (FileSystem.DirectoryExists(path)){return false;}diff --git a/MediaBrowser.Controller/Entities/UserViewBuilder.cs b/MediaBrowser.Controller/Entities/UserViewBuilder.csindex ce9a8903a3..e05b838d06 100644--- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs+++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs@@ -1036,6 +1036,11 @@ namespace MediaBrowser.Controller.Entitiesreturn false;}+ if (request.IsUnidentified.HasValue)+ {+ return false;+ }+if (!string.IsNullOrWhiteSpace(request.Person)){return false;@@ -1424,6 +1429,15 @@ namespace MediaBrowser.Controller.Entities}}+ if (query.IsUnidentified.HasValue)+ {+ var val = query.IsUnidentified.Value;+ if (item.IsUnidentified != val)+ {+ return false;+ }+ }+if (query.HasImdbId.HasValue){var filterValue = query.HasImdbId.Value;diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.csindex 8ef363b645..a0d2cd0d65 100644--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs@@ -1637,8 +1637,8 @@ namespace MediaBrowser.Server.Implementations.Library.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i));}- //private readonly TimeSpan _viewRefreshInterval = TimeSpan.FromHours(24);- private readonly TimeSpan _viewRefreshInterval = TimeSpan.FromMinutes(1);+ private readonly TimeSpan _viewRefreshInterval = TimeSpan.FromHours(24);+ //private readonly TimeSpan _viewRefreshInterval = TimeSpan.FromMinutes(1);public Task<UserView> GetNamedView(User user,string name,diff --git a/MediaBrowser.Server.Implementations/Localization/Core/de.json b/MediaBrowser.Server.Implementations/Localization/Core/de.jsonindex 37a6725a3c..0464b65ac2 100644--- a/MediaBrowser.Server.Implementations/Localization/Core/de.json+++ b/MediaBrowser.Server.Implementations/Localization/Core/de.json@@ -173,5 +173,5 @@"HeaderWriter": "Autoren","HeaderParentalRatings": "Altersbeschr\u00e4nkung","HeaderCommunityRatings": "Community Bewertungen",- "StartupEmbyServerIsLoading": "Emby Server is loading. Please try again shortly."+ "StartupEmbyServerIsLoading": "Emby Server startet, bitte versuchen Sie es gleich noch einmal."}\ No newline at end of filediff --git a/MediaBrowser.Server.Implementations/Localization/Core/es-MX.json b/MediaBrowser.Server.Implementations/Localization/Core/es-MX.jsonindex c6748f8e13..972f941003 100644--- a/MediaBrowser.Server.Implementations/Localization/Core/es-MX.json+++ b/MediaBrowser.Server.Implementations/Localization/Core/es-MX.json@@ -173,5 +173,5 @@"HeaderWriter": "Guionistas","HeaderParentalRatings": "Clasificaci\u00f3n Parental","HeaderCommunityRatings": "Clasificaciones de la comunidad",- "StartupEmbyServerIsLoading": "Emby Server is loading. Please try again shortly."+ "StartupEmbyServerIsLoading": "El servidor Emby esta cargando. Por favor intente de nuevo dentro de poco."}\ No newline at end of filediff --git a/MediaBrowser.Server.Implementations/Localization/Core/kk.json b/MediaBrowser.Server.Implementations/Localization/Core/kk.jsonindex 0ab2b6dd71..8635236062 100644--- a/MediaBrowser.Server.Implementations/Localization/Core/kk.json+++ b/MediaBrowser.Server.Implementations/Localization/Core/kk.json@@ -173,5 +173,5 @@"HeaderWriter": "\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439\u0448\u0456\u043b\u0435\u0440","HeaderParentalRatings": "\u0416\u0430\u0441\u0442\u0430\u0441 \u0441\u0430\u043d\u0430\u0442\u0442\u0430\u0440","HeaderCommunityRatings": "\u049a\u0430\u0443\u044b\u043c \u0431\u0430\u0493\u0430\u043b\u0430\u0443\u043b\u0430\u0440\u044b",- "StartupEmbyServerIsLoading": "Emby Server is loading. Please try again shortly."+ "StartupEmbyServerIsLoading": "Emby Server \u0436\u04af\u043a\u0442\u0435\u043b\u0443\u0434\u0435. \u04d8\u0440\u0435\u043a\u0435\u0442\u0442\u0456 \u043a\u04e9\u043f \u04b1\u0437\u0430\u043c\u0430\u0439 \u049b\u0430\u0439\u0442\u0430\u043b\u0430\u04a3\u044b\u0437."}\ No newline at end of filediff --git a/MediaBrowser.Server.Implementations/Localization/Core/nl.json b/MediaBrowser.Server.Implementations/Localization/Core/nl.jsonindex 3deeab69e5..b32ebefc35 100644--- a/MediaBrowser.Server.Implementations/Localization/Core/nl.json+++ b/MediaBrowser.Server.Implementations/Localization/Core/nl.json@@ -173,5 +173,5 @@"HeaderWriter": "Schrijvers","HeaderParentalRatings": "Ouderlijke toezicht","HeaderCommunityRatings": "Gemeenschapswaardering",- "StartupEmbyServerIsLoading": "Emby Server is loading. Please try again shortly."+ "StartupEmbyServerIsLoading": "Emby Server is aan het laden, probeer het later opnieuw."}\ No newline at end of filediff --git a/MediaBrowser.Server.Implementations/Localization/Core/pt-BR.json b/MediaBrowser.Server.Implementations/Localization/Core/pt-BR.jsonindex 76b66278b2..9548262c97 100644--- a/MediaBrowser.Server.Implementations/Localization/Core/pt-BR.json+++ b/MediaBrowser.Server.Implementations/Localization/Core/pt-BR.json@@ -173,5 +173,5 @@"HeaderWriter": "Escritores","HeaderParentalRatings": "Classifica\u00e7\u00f5es Parentais","HeaderCommunityRatings": "Avalia\u00e7\u00f5es da comunidade",- "StartupEmbyServerIsLoading": "Emby Server is loading. Please try again shortly."+ "StartupEmbyServerIsLoading": "O Servidor Emby est\u00e1 carregando. Por favor, tente novamente em breve."}\ No newline at end of filediff --git a/MediaBrowser.Server.Implementations/Localization/Core/ru.json b/MediaBrowser.Server.Implementations/Localization/Core/ru.jsonindex e4d44875a8..f36db9e25c 100644--- a/MediaBrowser.Server.Implementations/Localization/Core/ru.json+++ b/MediaBrowser.Server.Implementations/Localization/Core/ru.json@@ -173,5 +173,5 @@"HeaderWriter": "\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0441\u0442\u044b","HeaderParentalRatings": "\u0412\u043e\u0437\u0440\u0430\u0441\u0442\u043d\u0430\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f","HeaderCommunityRatings": "\u041e\u0431\u0449. \u043e\u0446\u0435\u043d\u043a\u0438",- "StartupEmbyServerIsLoading": "Emby Server is loading. Please try again shortly."+ "StartupEmbyServerIsLoading": "Emby Server \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f. \u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0432\u0441\u043a\u043e\u0440\u0435."}\ No newline at end of file