aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/ItemsService.cs
diff options
context:
space:
mode:
authorLogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>2019-10-28 21:54:40 -0700
committerGitHub <noreply@github.com>2019-10-28 21:54:40 -0700
commit8edb1c49d8d1835566bd30d8bf5460ab707b1ede (patch)
tree03c6b38523efcc4f29691cea3cdc4def0e8d26d8 /MediaBrowser.Api/UserLibrary/ItemsService.cs
parent984e415c66cbd995d12ea95a3a9d3e2561ce4869 (diff)
parentc9f4a74af02e08b895cd6a8b8a408b1c0edfb6c4 (diff)
Merge pull request #6 from jellyfin/master
Bringing my branch up to sync
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
-rw-r--r--MediaBrowser.Api/UserLibrary/ItemsService.cs15
1 files changed, 5 insertions, 10 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index f842230ee..b4a302648 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();
}
@@ -175,11 +175,6 @@ namespace MediaBrowser.Api.UserLibrary
var dtoList = _dtoService.GetBaseItemDtos(result.Items, dtoOptions, user);
- if (dtoList == null)
- {
- throw new InvalidOperationException("GetBaseItemDtos returned null");
- }
-
return new QueryResult<BaseItemDto>
{
TotalRecordCount = result.TotalRecordCount,
@@ -228,7 +223,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;
}
@@ -458,9 +455,7 @@ namespace MediaBrowser.Api.UserLibrary
IncludeItemTypes = new[] { typeof(MusicAlbum).Name },
Name = i,
Limit = 1
-
- }).Select(albumId => albumId);
-
+ });
}).ToArray();
}