aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary
diff options
context:
space:
mode:
authorwhooo <who+github@cnackers.org>2019-08-11 12:42:19 +0200
committerGitHub <noreply@github.com>2019-08-11 12:42:19 +0200
commit9556561a7794dc65a8565194aedf65700d0bcd95 (patch)
tree31403a07db0de8090b7bcd6db8ac24728d66090b /MediaBrowser.Api/UserLibrary
parenta1efe4caca8cc444f9d3caa6a45edea7e959c41a (diff)
parenta96fa7a5c705d8b694c828ff451a77d60711d329 (diff)
Merge branch 'master' into master
Diffstat (limited to 'MediaBrowser.Api/UserLibrary')
-rw-r--r--MediaBrowser.Api/UserLibrary/ItemsService.cs6
-rw-r--r--MediaBrowser.Api/UserLibrary/UserViewsService.cs3
2 files changed, 6 insertions, 3 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index f842230ee3..a1e976bed8 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -99,7 +99,7 @@ namespace MediaBrowser.Api.UserLibrary
{
ancestorIds = _libraryManager.GetUserRootFolder().GetChildren(user, true)
.Where(i => i is Folder)
- .Where(i => !excludeFolderIds.Contains(i.Id.ToString("N")))
+ .Where(i => !excludeFolderIds.Contains(i.Id.ToString("N", CultureInfo.InvariantCulture)))
.Select(i => i.Id)
.ToArray();
}
@@ -228,7 +228,9 @@ namespace MediaBrowser.Api.UserLibrary
var collectionFolders = _libraryManager.GetCollectionFolders(item);
foreach (var collectionFolder in collectionFolders)
{
- if (user.Policy.EnabledFolders.Contains(collectionFolder.Id.ToString("N"), StringComparer.OrdinalIgnoreCase))
+ if (user.Policy.EnabledFolders.Contains(
+ collectionFolder.Id.ToString("N", CultureInfo.InvariantCulture),
+ StringComparer.OrdinalIgnoreCase))
{
isInEnabledFolder = true;
}
diff --git a/MediaBrowser.Api/UserLibrary/UserViewsService.cs b/MediaBrowser.Api/UserLibrary/UserViewsService.cs
index 1d61c5c1e8..2fa5d8933c 100644
--- a/MediaBrowser.Api/UserLibrary/UserViewsService.cs
+++ b/MediaBrowser.Api/UserLibrary/UserViewsService.cs
@@ -1,4 +1,5 @@
using System;
+using System.Globalization;
using System.Linq;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
@@ -116,7 +117,7 @@ namespace MediaBrowser.Api.UserLibrary
.Select(i => new SpecialViewOption
{
Name = i.Name,
- Id = i.Id.ToString("N")
+ Id = i.Id.ToString("N", CultureInfo.InvariantCulture)
})
.OrderBy(i => i.Name)