diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-11-01 16:53:16 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-11-01 17:07:42 +0100 |
| commit | 846857b60eb795fc7fd7384b24be5ce4737d65d8 (patch) | |
| tree | 4d74ae5907b57012723fbd1382f49893c0b9ccc7 /MediaBrowser.Controller/Entities/UserView.cs | |
| parent | ef623f512903624bba48f243e3a659ec46064054 (diff) | |
Deserialize with the correct type (and warning fixes)
Diffstat (limited to 'MediaBrowser.Controller/Entities/UserView.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/UserView.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/MediaBrowser.Controller/Entities/UserView.cs b/MediaBrowser.Controller/Entities/UserView.cs index fd045f0dd..4ce9ec6f8 100644 --- a/MediaBrowser.Controller/Entities/UserView.cs +++ b/MediaBrowser.Controller/Entities/UserView.cs @@ -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] |
