Merge pull request #6979 from crobibero/baseitemkind

Use BaseItemKind where possible
This commit is contained in:
Claus Vium
2021-12-15 08:28:44 +01:00
committed by GitHub
53 changed files with 308 additions and 355 deletions

View File

@@ -2,6 +2,7 @@
#pragma warning disable CS1591
using System;
using Jellyfin.Data.Enums;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Querying
@@ -48,7 +49,7 @@ namespace MediaBrowser.Model.Querying
/// Gets or sets the include item types.
/// </summary>
/// <value>The include item types.</value>
public string[] IncludeItemTypes { get; set; }
public BaseItemKind[] IncludeItemTypes { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is played.

View File

@@ -2,6 +2,7 @@
#pragma warning disable CS1591
using System;
using Jellyfin.Data.Enums;
namespace MediaBrowser.Model.Search
{
@@ -16,8 +17,8 @@ namespace MediaBrowser.Model.Search
IncludeStudios = true;
MediaTypes = Array.Empty<string>();
IncludeItemTypes = Array.Empty<string>();
ExcludeItemTypes = Array.Empty<string>();
IncludeItemTypes = Array.Empty<BaseItemKind>();
ExcludeItemTypes = Array.Empty<BaseItemKind>();
}
/// <summary>
@@ -56,9 +57,9 @@ namespace MediaBrowser.Model.Search
public string[] MediaTypes { get; set; }
public string[] IncludeItemTypes { get; set; }
public BaseItemKind[] IncludeItemTypes { get; set; }
public string[] ExcludeItemTypes { get; set; }
public BaseItemKind[] ExcludeItemTypes { get; set; }
public Guid? ParentId { get; set; }

View File

@@ -1,3 +1,5 @@
using Jellyfin.Data.Enums;
#nullable disable
namespace MediaBrowser.Model.Session
{
@@ -8,10 +10,9 @@ namespace MediaBrowser.Model.Session
{
/// <summary>
/// Gets or sets the item type.
/// Artist, Genre, Studio, Person, or any kind of BaseItem.
/// </summary>
/// <value>The type of the item.</value>
public string ItemType { get; set; }
public BaseItemKind ItemType { get; set; }
/// <summary>
/// Gets or sets the item id.