diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2019-11-10 16:51:54 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-10 16:51:54 +0900 |
| commit | f51f59d675e863ae5537416dbebfb2fd738e7a63 (patch) | |
| tree | 90b11e7294e74051745430ce56e22a7fba9773c4 /MediaBrowser.Controller/Entities/UserView.cs | |
| parent | 522df3196dcf3980d20a86a36b2ef90f10c6493a (diff) | |
| parent | 846857b60eb795fc7fd7384b24be5ce4737d65d8 (diff) | |
Merge pull request #1965 from Bond-009/dbjson
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] |
