|
|
@ -1,4 +1,4 @@
|
|
|
|
#pragma warning disable CS1591
|
|
|
|
#pragma warning disable CA1044, CA1819, CA2227, CS1591
|
|
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
@ -12,6 +12,55 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public class InternalItemsQuery
|
|
|
|
public class InternalItemsQuery
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
public InternalItemsQuery()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AlbumArtistIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
AlbumIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
AncestorIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
ArtistIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
BlockUnratedItems = Array.Empty<UnratedItem>();
|
|
|
|
|
|
|
|
BoxSetLibraryFolders = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
ChannelIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
ContributingArtistIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
DtoOptions = new DtoOptions();
|
|
|
|
|
|
|
|
EnableTotalRecordCount = true;
|
|
|
|
|
|
|
|
ExcludeArtistIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
ExcludeInheritedTags = Array.Empty<string>();
|
|
|
|
|
|
|
|
ExcludeItemIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
ExcludeItemTypes = Array.Empty<string>();
|
|
|
|
|
|
|
|
ExcludeTags = Array.Empty<string>();
|
|
|
|
|
|
|
|
GenreIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
Genres = Array.Empty<string>();
|
|
|
|
|
|
|
|
GroupByPresentationUniqueKey = true;
|
|
|
|
|
|
|
|
ImageTypes = Array.Empty<ImageType>();
|
|
|
|
|
|
|
|
IncludeItemTypes = Array.Empty<string>();
|
|
|
|
|
|
|
|
ItemIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
MediaTypes = Array.Empty<string>();
|
|
|
|
|
|
|
|
MinSimilarityScore = 20;
|
|
|
|
|
|
|
|
OfficialRatings = Array.Empty<string>();
|
|
|
|
|
|
|
|
OrderBy = Array.Empty<ValueTuple<string, SortOrder>>();
|
|
|
|
|
|
|
|
PersonIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
PersonTypes = Array.Empty<string>();
|
|
|
|
|
|
|
|
PresetViews = Array.Empty<string>();
|
|
|
|
|
|
|
|
SeriesStatuses = Array.Empty<SeriesStatus>();
|
|
|
|
|
|
|
|
SourceTypes = Array.Empty<SourceType>();
|
|
|
|
|
|
|
|
StudioIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
Tags = Array.Empty<string>();
|
|
|
|
|
|
|
|
TopParentIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
TrailerTypes = Array.Empty<TrailerType>();
|
|
|
|
|
|
|
|
VideoTypes = Array.Empty<VideoType>();
|
|
|
|
|
|
|
|
Years = Array.Empty<int>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public InternalItemsQuery(User? user)
|
|
|
|
|
|
|
|
: this()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (user != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
SetUser(user);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool Recursive { get; set; }
|
|
|
|
public bool Recursive { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public int? StartIndex { get; set; }
|
|
|
|
public int? StartIndex { get; set; }
|
|
|
@ -186,23 +235,6 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
|
|
|
|
|
|
|
|
public Guid[] TopParentIds { get; set; }
|
|
|
|
public Guid[] TopParentIds { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public BaseItem? Parent
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (value == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ParentId = Guid.Empty;
|
|
|
|
|
|
|
|
ParentType = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ParentId = value.Id;
|
|
|
|
|
|
|
|
ParentType = value.GetType().Name;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string[] PresetViews { get; set; }
|
|
|
|
public string[] PresetViews { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public TrailerType[] TrailerTypes { get; set; }
|
|
|
|
public TrailerType[] TrailerTypes { get; set; }
|
|
|
@ -270,70 +302,21 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public bool? DisplayAlbumFolders { get; set; }
|
|
|
|
public bool? DisplayAlbumFolders { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public InternalItemsQuery()
|
|
|
|
public BaseItem? Parent
|
|
|
|
{
|
|
|
|
|
|
|
|
AlbumArtistIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
AlbumIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
AncestorIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
ArtistIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
BlockUnratedItems = Array.Empty<UnratedItem>();
|
|
|
|
|
|
|
|
BoxSetLibraryFolders = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
ChannelIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
ContributingArtistIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
DtoOptions = new DtoOptions();
|
|
|
|
|
|
|
|
EnableTotalRecordCount = true;
|
|
|
|
|
|
|
|
ExcludeArtistIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
ExcludeInheritedTags = Array.Empty<string>();
|
|
|
|
|
|
|
|
ExcludeItemIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
ExcludeItemTypes = Array.Empty<string>();
|
|
|
|
|
|
|
|
ExcludeTags = Array.Empty<string>();
|
|
|
|
|
|
|
|
GenreIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
Genres = Array.Empty<string>();
|
|
|
|
|
|
|
|
GroupByPresentationUniqueKey = true;
|
|
|
|
|
|
|
|
ImageTypes = Array.Empty<ImageType>();
|
|
|
|
|
|
|
|
IncludeItemTypes = Array.Empty<string>();
|
|
|
|
|
|
|
|
ItemIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
MediaTypes = Array.Empty<string>();
|
|
|
|
|
|
|
|
MinSimilarityScore = 20;
|
|
|
|
|
|
|
|
OfficialRatings = Array.Empty<string>();
|
|
|
|
|
|
|
|
OrderBy = Array.Empty<ValueTuple<string, SortOrder>>();
|
|
|
|
|
|
|
|
PersonIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
PersonTypes = Array.Empty<string>();
|
|
|
|
|
|
|
|
PresetViews = Array.Empty<string>();
|
|
|
|
|
|
|
|
SeriesStatuses = Array.Empty<SeriesStatus>();
|
|
|
|
|
|
|
|
SourceTypes = Array.Empty<SourceType>();
|
|
|
|
|
|
|
|
StudioIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
Tags = Array.Empty<string>();
|
|
|
|
|
|
|
|
TopParentIds = Array.Empty<Guid>();
|
|
|
|
|
|
|
|
TrailerTypes = Array.Empty<TrailerType>();
|
|
|
|
|
|
|
|
VideoTypes = Array.Empty<VideoType>();
|
|
|
|
|
|
|
|
Years = Array.Empty<int>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public InternalItemsQuery(User? user)
|
|
|
|
|
|
|
|
: this()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (user != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
SetUser(user);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void SetUser(User user)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MaxParentalRating = user.MaxParentalAgeRating;
|
|
|
|
set
|
|
|
|
|
|
|
|
|
|
|
|
if (MaxParentalRating.HasValue)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string other = UnratedItem.Other.ToString();
|
|
|
|
if (value == null)
|
|
|
|
BlockUnratedItems = user.GetPreference(PreferenceKind.BlockUnratedItems)
|
|
|
|
{
|
|
|
|
.Where(i => i != other)
|
|
|
|
ParentId = Guid.Empty;
|
|
|
|
.Select(e => Enum.Parse<UnratedItem>(e, true)).ToArray();
|
|
|
|
ParentType = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ParentId = value.Id;
|
|
|
|
|
|
|
|
ParentType = value.GetType().Name;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ExcludeInheritedTags = user.GetPreference(PreferenceKind.BlockedTags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
User = user;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Dictionary<string, string>? HasAnyProviderId { get; set; }
|
|
|
|
public Dictionary<string, string>? HasAnyProviderId { get; set; }
|
|
|
@ -361,5 +344,22 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
public string? SearchTerm { get; set; }
|
|
|
|
public string? SearchTerm { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string? SeriesTimerId { get; set; }
|
|
|
|
public string? SeriesTimerId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void SetUser(User user)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MaxParentalRating = user.MaxParentalAgeRating;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (MaxParentalRating.HasValue)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
string other = UnratedItem.Other.ToString();
|
|
|
|
|
|
|
|
BlockUnratedItems = user.GetPreference(PreferenceKind.BlockUnratedItems)
|
|
|
|
|
|
|
|
.Where(i => i != other)
|
|
|
|
|
|
|
|
.Select(e => Enum.Parse<UnratedItem>(e, true)).ToArray();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExcludeInheritedTags = user.GetPreference(PreferenceKind.BlockedTags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
User = user;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|