aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/UserViewManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-10-13 01:43:11 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-10-13 01:43:11 -0400
commit66ad10348fe9383df7b939c2de5a93c044ec351d (patch)
tree3987e18da4dbe4aa0bb36383a344aee16ca28158 /Emby.Server.Implementations/Library/UserViewManager.cs
parent6623fe10ee1f74cafc8fadf8caa531178a0b26fe (diff)
update translations
Diffstat (limited to 'Emby.Server.Implementations/Library/UserViewManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/UserViewManager.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs
index 4ee0f553f..ddab3caa5 100644
--- a/Emby.Server.Implementations/Library/UserViewManager.cs
+++ b/Emby.Server.Implementations/Library/UserViewManager.cs
@@ -95,13 +95,15 @@ namespace Emby.Server.Implementations.Library
if (parents.Count > 0)
{
- list.Add(GetUserView(parents, viewType, string.Empty, user, query.PresetViews, cancellationToken));
+ var localizationKey = viewType.Replace("Tv", string.Empty);
+
+ list.Add(GetUserView(parents, viewType, localizationKey, string.Empty, user, query.PresetViews, cancellationToken));
}
}
if (_config.Configuration.EnableFolderView)
{
- var name = _localizationManager.GetLocalizedString("ViewType" + CollectionType.Folders);
+ var name = _localizationManager.GetLocalizedString("Folders");
list.Add(_libraryManager.GetNamedView(name, CollectionType.Folders, string.Empty, cancellationToken));
}
@@ -158,21 +160,21 @@ namespace Emby.Server.Implementations.Library
.ToArray();
}
- public UserView GetUserSubView(string name, string parentId, string type, string sortName, CancellationToken cancellationToken)
+ public UserView GetUserSubViewWithName(string name, string parentId, string type, string sortName, CancellationToken cancellationToken)
{
var uniqueId = parentId + "subview" + type;
return _libraryManager.GetNamedView(name, parentId, type, sortName, uniqueId, cancellationToken);
}
- public UserView GetUserSubView(string parentId, string type, string sortName, CancellationToken cancellationToken)
+ public UserView GetUserSubView(string parentId, string type, string localizationKey, string sortName, CancellationToken cancellationToken)
{
- var name = _localizationManager.GetLocalizedString("ViewType" + type);
+ var name = _localizationManager.GetLocalizedString(localizationKey);
- return GetUserSubView(name, parentId, type, sortName, cancellationToken);
+ return GetUserSubViewWithName(name, parentId, type, sortName, cancellationToken);
}
- private Folder GetUserView(List<ICollectionFolder> parents, string viewType, string sortName, User user, string[] presetViews, CancellationToken cancellationToken)
+ private Folder GetUserView(List<ICollectionFolder> parents, string viewType, string localizationKey, string sortName, User user, string[] presetViews, CancellationToken cancellationToken)
{
if (parents.Count == 1 && parents.All(i => string.Equals(i.CollectionType, viewType, StringComparison.OrdinalIgnoreCase)))
{
@@ -184,7 +186,7 @@ namespace Emby.Server.Implementations.Library
return GetUserView((Folder)parents[0], viewType, string.Empty, cancellationToken);
}
- var name = _localizationManager.GetLocalizedString("ViewType" + viewType);
+ var name = _localizationManager.GetLocalizedString(localizationKey);
return _libraryManager.GetNamedView(user, name, viewType, sortName, cancellationToken);
}