aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs
diff options
context:
space:
mode:
authorstefan <stefan@hegedues.at>2018-09-12 19:26:21 +0200
committerstefan <stefan@hegedues.at>2018-09-12 19:26:21 +0200
commit48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch)
tree8dae77a31670a888d733484cb17dd4077d5444e8 /MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs
parentc32d8656382a0eacb301692e0084377fc433ae9b (diff)
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs')
-rw-r--r--MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs62
1 files changed, 22 insertions, 40 deletions
diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs
index 88d080db5..11c12c718 100644
--- a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs
+++ b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs
@@ -58,6 +58,8 @@ namespace MediaBrowser.Api.UserLibrary
[ApiMember(Name = "IsHD", Description = "Optional filter by items that are HD or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
public bool? IsHD { get; set; }
+ public bool? Is4K { get; set; }
+
[ApiMember(Name = "LocationTypes", Description = "Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
public string LocationTypes { get; set; }
@@ -103,9 +105,7 @@ namespace MediaBrowser.Api.UserLibrary
[ApiMember(Name = "HasTvdbId", Description = "Optional filter by items that have a tvdb id or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
public bool? HasTvdbId { get; set; }
- [ApiMember(Name = "IsInBoxSet", Description = "Optional filter by items that are in boxsets, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
- public bool? IsInBoxSet { get; set; }
-
+ [ApiMember(Name = "ExcludeItemIds", Description = "Optional. If specified, results will be filtered by exxcluding item ids. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
public string ExcludeItemIds { get; set; }
public bool EnableTotalRecordCount { get; set; }
@@ -131,6 +131,8 @@ namespace MediaBrowser.Api.UserLibrary
[ApiMember(Name = "Recursive", Description = "When searching within folders, this determines whether or not the search will be recursive. true/false", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")]
public bool Recursive { get; set; }
+ public string SearchTerm { get; set; }
+
/// <summary>
/// Gets or sets the sort order.
/// </summary>
@@ -277,6 +279,10 @@ namespace MediaBrowser.Api.UserLibrary
[ApiMember(Name = "ArtistIds", Description = "Optional. If specified, results will be filtered based on artist. This allows multiple, pipe delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
public string ArtistIds { get; set; }
+ public string AlbumArtistIds { get; set; }
+
+ public string ContributingArtistIds { get; set; }
+
[ApiMember(Name = "Albums", Description = "Optional. If specified, results will be filtered based on album. This allows multiple, pipe delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
public string Albums { get; set; }
@@ -300,8 +306,8 @@ namespace MediaBrowser.Api.UserLibrary
/// Gets or sets the user id.
/// </summary>
/// <value>The user id.</value>
- [ApiMember(Name = "UserId", Description = "User Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "GET")]
- public string UserId { get; set; }
+ [ApiMember(Name = "UserId", Description = "User Id", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
+ public Guid UserId { get; set; }
/// <summary>
/// Gets or sets the min offical rating.
@@ -321,6 +327,12 @@ namespace MediaBrowser.Api.UserLibrary
[ApiMember(Name = "CollapseBoxSetItems", Description = "Whether or not to hide items behind their boxsets.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
public bool? CollapseBoxSetItems { get; set; }
+
+ public int? MinWidth { get; set; }
+ public int? MinHeight { get; set; }
+ public int? MaxWidth { get; set; }
+ public int? MaxHeight { get; set; }
+
/// <summary>
/// Gets or sets the video formats.
/// </summary>
@@ -369,11 +381,6 @@ namespace MediaBrowser.Api.UserLibrary
return (IncludeItemTypes ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
}
- public string[] GetExcludeItemIds()
- {
- return (ExcludeItemIds ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- }
-
public string[] GetExcludeItemTypes()
{
return (ExcludeItemTypes ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -389,36 +396,11 @@ namespace MediaBrowser.Api.UserLibrary
return (Studios ?? string.Empty).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
}
- public string[] GetArtistIds()
- {
- return (ArtistIds ?? string.Empty).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
- }
-
- public string[] GetStudioIds()
- {
- return (StudioIds ?? string.Empty).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
- }
-
- public string[] GetGenreIds()
- {
- return (GenreIds ?? string.Empty).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
- }
-
public string[] GetPersonTypes()
{
return (PersonTypes ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
}
- public string[] GetPersonIds()
- {
- return (PersonIds ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- }
-
- public string[] GetItemIds()
- {
- return (Ids ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- }
-
public VideoType[] GetVideoTypes()
{
var val = VideoTypes;
@@ -467,18 +449,18 @@ namespace MediaBrowser.Api.UserLibrary
/// Gets the order by.
/// </summary>
/// <returns>IEnumerable{ItemSortBy}.</returns>
- public Tuple<string, SortOrder>[] GetOrderBy()
+ public ValueTuple<string, SortOrder>[] GetOrderBy()
{
return GetOrderBy(SortBy, SortOrder);
}
- public static Tuple<string, SortOrder>[] GetOrderBy(string sortBy, string requestedSortOrder)
+ public static ValueTuple<string, SortOrder>[] GetOrderBy(string sortBy, string requestedSortOrder)
{
var val = sortBy;
if (string.IsNullOrEmpty(val))
{
- return new Tuple<string, Model.Entities.SortOrder>[] { };
+ return Array.Empty<ValueTuple<string, Model.Entities.SortOrder>>();
}
var vals = val.Split(',');
@@ -489,7 +471,7 @@ namespace MediaBrowser.Api.UserLibrary
var sortOrders = requestedSortOrder.Split(',');
- var result = new Tuple<string, Model.Entities.SortOrder>[vals.Length];
+ var result = new ValueTuple<string, Model.Entities.SortOrder>[vals.Length];
for (var i = 0; i < vals.Length; i++)
{
@@ -498,7 +480,7 @@ namespace MediaBrowser.Api.UserLibrary
var sortOrderValue = sortOrders.Length > sortOrderIndex ? sortOrders[sortOrderIndex] : null;
var sortOrder = string.Equals(sortOrderValue, "Descending", StringComparison.OrdinalIgnoreCase) ? MediaBrowser.Model.Entities.SortOrder.Descending : MediaBrowser.Model.Entities.SortOrder.Ascending;
- result[i] = new Tuple<string, Model.Entities.SortOrder>(vals[i], sortOrder);
+ result[i] = new ValueTuple<string, Model.Entities.SortOrder>(vals[i], sortOrder);
}
return result;