aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-09-16 21:33:46 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-09-16 21:33:46 -0400
commit29923506cada909aa3ebcb7714781663d1671d46 (patch)
tree29c32064d9105f8a1d2fa4127b3d8922ece19473
parenta4a3a54dadd8a0871c815cd2e116f13f985e5b97 (diff)
rework subtitle editor
-rw-r--r--MediaBrowser.Controller/Entities/Folder.cs23
-rw-r--r--MediaBrowser.Controller/Entities/UserViewBuilder.cs14
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs4
-rw-r--r--MediaBrowser.Server.Implementations/Localization/Core/de.json2
-rw-r--r--MediaBrowser.Server.Implementations/Localization/Core/es-MX.json2
-rw-r--r--MediaBrowser.Server.Implementations/Localization/Core/kk.json2
-rw-r--r--MediaBrowser.Server.Implementations/Localization/Core/nl.json2
-rw-r--r--MediaBrowser.Server.Implementations/Localization/Core/pt-BR.json2
-rw-r--r--MediaBrowser.Server.Implementations/Localization/Core/ru.json2
9 files changed, 39 insertions, 14 deletions
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index bb23d3664..4cdc4657e 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -371,7 +371,7 @@ namespace MediaBrowser.Controller.Entities
public 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.Entities
currentChild.DateModified = child.DateModified;
}
- currentChild.IsOffline = false;
+ await UpdateIsOffline(currentChild, false).ConfigureAwait(false);
validChildren.Add(currentChild);
}
else
@@ -509,12 +509,12 @@ namespace MediaBrowser.Controller.Entities
else 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.Entities
progress.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 top
while (!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.cs
index ce9a8903a..e05b838d0 100644
--- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs
+++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs
@@ -1036,6 +1036,11 @@ namespace MediaBrowser.Controller.Entities
return 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.cs
index 8ef363b64..a0d2cd0d6 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.json
index 37a6725a3..0464b65ac 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 file
diff --git a/MediaBrowser.Server.Implementations/Localization/Core/es-MX.json b/MediaBrowser.Server.Implementations/Localization/Core/es-MX.json
index c6748f8e1..972f94100 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 file
diff --git a/MediaBrowser.Server.Implementations/Localization/Core/kk.json b/MediaBrowser.Server.Implementations/Localization/Core/kk.json
index 0ab2b6dd7..863523606 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 file
diff --git a/MediaBrowser.Server.Implementations/Localization/Core/nl.json b/MediaBrowser.Server.Implementations/Localization/Core/nl.json
index 3deeab69e..b32ebefc3 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 file
diff --git a/MediaBrowser.Server.Implementations/Localization/Core/pt-BR.json b/MediaBrowser.Server.Implementations/Localization/Core/pt-BR.json
index 76b66278b..9548262c9 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 file
diff --git a/MediaBrowser.Server.Implementations/Localization/Core/ru.json b/MediaBrowser.Server.Implementations/Localization/Core/ru.json
index e4d44875a..f36db9e25 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