aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Providers/ItemInfo.cs
blob: be3b25aee0925f997c6c7eb26fc01d398ff04abe (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
#pragma warning disable CS1591

using System;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Entities;

namespace MediaBrowser.Controller.Providers
{
    public class ItemInfo
    {
        public ItemInfo(BaseItem item)
        {
            Path = item.Path;
            ParentId = item.ParentId;
            IndexNumber = item.IndexNumber;
            ContainingFolderPath = item.ContainingFolderPath;
            IsInMixedFolder = item.IsInMixedFolder;

            if (item is Video video)
            {
                VideoType = video.VideoType;
                IsPlaceHolder = video.IsPlaceHolder;
            }

            ItemType = item.GetType();
        }

        public Type ItemType { get; set; }

        public string Path { get; set; }

        public Guid ParentId { get; set; }

        public int? IndexNumber { get; set; }

        public string ContainingFolderPath { get; set; }

        public VideoType VideoType { get; set; }

        public bool IsInMixedFolder { get; set; }

        public bool IsPlaceHolder { get; set; }
    }
}