aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/LinkedChild.cs
blob: a3aa9dd0c9f19815a1d01a9828b7234b5025c0ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#nullable disable

#pragma warning disable CS1591

using System;

namespace MediaBrowser.Controller.Entities
{
    public class LinkedChild
    {
        public LinkedChild()
        {
        }

        /// <summary>
        /// Gets or sets the path.
        /// </summary>
        [Obsolete("Use ItemId instead")]
        public string Path { get; set; }

        public LinkedChildType Type { get; set; }

        /// <summary>
        /// Gets or sets the library item id.
        /// </summary>
        [Obsolete("Use ItemId instead")]
        public string LibraryItemId { get; set; }

        /// <summary>
        /// Gets or sets the linked item id.
        /// </summary>
        public Guid? ItemId { get; set; }

        public static LinkedChild Create(BaseItem item)
        {
            ArgumentNullException.ThrowIfNull(item);

            return new LinkedChild
            {
                ItemId = item.Id,
                Type = LinkedChildType.Manual
            };
        }
    }
}