aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Library')
-rw-r--r--MediaBrowser.Controller/Library/ILibraryManager.cs24
-rw-r--r--MediaBrowser.Controller/Library/IUserViewManager.cs3
-rw-r--r--MediaBrowser.Controller/Library/ItemResolveArgs.cs7
3 files changed, 18 insertions, 16 deletions
diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs
index f34e3d68d..9ec22324f 100644
--- a/MediaBrowser.Controller/Library/ILibraryManager.cs
+++ b/MediaBrowser.Controller/Library/ILibraryManager.cs
@@ -79,7 +79,7 @@ namespace MediaBrowser.Controller.Library
IDirectoryService directoryService,
Folder parent,
LibraryOptions libraryOptions,
- string collectionType = null);
+ CollectionType? collectionType = null);
/// <summary>
/// Gets a Person.
@@ -199,9 +199,9 @@ namespace MediaBrowser.Controller.Library
/// <param name="sortBy">The sort by.</param>
/// <param name="sortOrder">The sort order.</param>
/// <returns>IEnumerable{BaseItem}.</returns>
- IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<string> sortBy, SortOrder sortOrder);
+ IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<ItemSortBy> sortBy, SortOrder sortOrder);
- IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<(string OrderBy, SortOrder SortOrder)> orderBy);
+ IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<(ItemSortBy OrderBy, SortOrder SortOrder)> orderBy);
/// <summary>
/// Gets the user root folder.
@@ -256,28 +256,28 @@ namespace MediaBrowser.Controller.Library
/// </summary>
/// <param name="item">The item.</param>
/// <returns>System.String.</returns>
- string GetContentType(BaseItem item);
+ CollectionType? GetContentType(BaseItem item);
/// <summary>
/// Gets the type of the inherited content.
/// </summary>
/// <param name="item">The item.</param>
/// <returns>System.String.</returns>
- string GetInheritedContentType(BaseItem item);
+ CollectionType? GetInheritedContentType(BaseItem item);
/// <summary>
/// Gets the type of the configured content.
/// </summary>
/// <param name="item">The item.</param>
/// <returns>System.String.</returns>
- string GetConfiguredContentType(BaseItem item);
+ CollectionType? GetConfiguredContentType(BaseItem item);
/// <summary>
/// Gets the type of the configured content.
/// </summary>
/// <param name="path">The path.</param>
/// <returns>System.String.</returns>
- string GetConfiguredContentType(string path);
+ CollectionType? GetConfiguredContentType(string path);
/// <summary>
/// Normalizes the root path list.
@@ -329,7 +329,7 @@ namespace MediaBrowser.Controller.Library
User user,
string name,
Guid parentId,
- string viewType,
+ CollectionType? viewType,
string sortName);
/// <summary>
@@ -343,7 +343,7 @@ namespace MediaBrowser.Controller.Library
UserView GetNamedView(
User user,
string name,
- string viewType,
+ CollectionType? viewType,
string sortName);
/// <summary>
@@ -355,7 +355,7 @@ namespace MediaBrowser.Controller.Library
/// <returns>The named view.</returns>
UserView GetNamedView(
string name,
- string viewType,
+ CollectionType viewType,
string sortName);
/// <summary>
@@ -370,7 +370,7 @@ namespace MediaBrowser.Controller.Library
UserView GetNamedView(
string name,
Guid parentId,
- string viewType,
+ CollectionType? viewType,
string sortName,
string uniqueId);
@@ -383,7 +383,7 @@ namespace MediaBrowser.Controller.Library
/// <returns>The shadow view.</returns>
UserView GetShadowView(
BaseItem parent,
- string viewType,
+ CollectionType? viewType,
string sortName);
/// <summary>
diff --git a/MediaBrowser.Controller/Library/IUserViewManager.cs b/MediaBrowser.Controller/Library/IUserViewManager.cs
index 055627d3e..a565dc88b 100644
--- a/MediaBrowser.Controller/Library/IUserViewManager.cs
+++ b/MediaBrowser.Controller/Library/IUserViewManager.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
+using Jellyfin.Data.Enums;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Library;
@@ -28,7 +29,7 @@ namespace MediaBrowser.Controller.Library
/// <param name="localizationKey">Localization key to use.</param>
/// <param name="sortName">Sort to use.</param>
/// <returns>User view.</returns>
- UserView GetUserSubView(Guid parentId, string type, string localizationKey, string sortName);
+ UserView GetUserSubView(Guid parentId, CollectionType? type, string localizationKey, string sortName);
/// <summary>
/// Gets latest items.
diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.cs
index dcd0110fb..6202f92f5 100644
--- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs
+++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs
@@ -5,6 +5,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using Jellyfin.Data.Enums;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.IO;
@@ -120,7 +121,7 @@ namespace MediaBrowser.Controller.Library
}
}
- public string CollectionType { get; set; }
+ public CollectionType? CollectionType { get; set; }
public bool HasParent<T>()
where T : Folder
@@ -220,7 +221,7 @@ namespace MediaBrowser.Controller.Library
return GetFileSystemEntryByName(name) is not null;
}
- public string GetCollectionType()
+ public CollectionType? GetCollectionType()
{
return CollectionType;
}
@@ -229,7 +230,7 @@ namespace MediaBrowser.Controller.Library
/// Gets the configured content type for the path.
/// </summary>
/// <returns>The configured content type.</returns>
- public string GetConfiguredContentType()
+ public CollectionType? GetConfiguredContentType()
{
return _libraryManager.GetConfiguredContentType(Path);
}