Deserialize with the correct type (and warning fixes)

This commit is contained in:
Bond_009
2019-11-01 16:53:16 +01:00
parent ef623f5129
commit 846857b60e
4 changed files with 18 additions and 16 deletions

View File

@@ -10,34 +10,36 @@ namespace MediaBrowser.Controller.Entities
{
public class UserView : Folder, IHasCollectionType
{
/// <inheritdoc />
public string ViewType { get; set; }
/// <inheritdoc />
public new Guid DisplayParentId { get; set; }
/// <inheritdoc />
public Guid? UserId { get; set; }
public static ITVSeriesManager TVSeriesManager;
/// <inheritdoc />
[JsonIgnore]
public string CollectionType => ViewType;
/// <inheritdoc />
public override IEnumerable<Guid> GetIdsForAncestorQuery()
{
var list = new List<Guid>();
if (!DisplayParentId.Equals(Guid.Empty))
{
list.Add(DisplayParentId);
yield return DisplayParentId;
}
else if (!ParentId.Equals(Guid.Empty))
{
list.Add(ParentId);
yield return ParentId;
}
else
{
list.Add(Id);
yield return Id;
}
return list;
}
[JsonIgnore]