Fix partial set of MediaBrowser.Controller/Entities warnings

This commit is contained in:
Rich Lander
2021-07-23 13:07:19 -07:00
parent 0e2a6f8216
commit a7cc77e7fa
11 changed files with 109 additions and 109 deletions

View File

@@ -1,4 +1,4 @@
#pragma warning disable CS1591
#pragma warning disable CA1819, CA2227, CS1591
using System;
using System.Collections.Generic;
@@ -12,6 +12,15 @@ namespace MediaBrowser.Controller.Entities
{
public class InternalItemsQuery
{
public InternalItemsQuery(User? user)
: this()
{
if (user != null)
{
SetUser(user);
}
}
public bool Recursive { get; set; }
public int? StartIndex { get; set; }
@@ -186,23 +195,6 @@ namespace MediaBrowser.Controller.Entities
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 TrailerType[] TrailerTypes { get; set; }
@@ -270,6 +262,23 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
public bool? DisplayAlbumFolders { get; set; }
public BaseItem? Parent
{
set
{
if (value == null)
{
ParentId = Guid.Empty;
ParentType = null;
}
else
{
ParentId = value.Id;
ParentType = value.GetType().Name;
}
}
}
public InternalItemsQuery()
{
AlbumArtistIds = Array.Empty<Guid>();
@@ -310,15 +319,6 @@ namespace MediaBrowser.Controller.Entities
Years = Array.Empty<int>();
}
public InternalItemsQuery(User? user)
: this()
{
if (user != null)
{
SetUser(user);
}
}
public void SetUser(User user)
{
MaxParentalRating = user.MaxParentalAgeRating;