aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/IItemByName.cs
blob: 3e79e3f00aefa650d8ce68f323a88f4ab2d4b5a1 (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.Collections.Generic;

namespace MediaBrowser.Controller.Entities
{
    /// <summary>
    /// Marker interface.
    /// </summary>
    public interface IItemByName
    {
        IReadOnlyList<BaseItem> GetTaggedItems(InternalItemsQuery query);

        TaggedItemCounts GetTaggedItemCounts(InternalItemsQuery query);
    }

    public interface IHasDualAccess : IItemByName
    {
        bool IsAccessedByName { get; }
    }

    public class TaggedItemCounts
    {
        public int? AlbumCount { get; set; }

        public int? ArtistCount { get; set; }

        public int? EpisodeCount { get; set; }

        public int? MovieCount { get; set; }

        public int? MusicVideoCount { get; set; }

        public int? ProgramCount { get; set; }

        public int? SeriesCount { get; set; }

        public int? SongCount { get; set; }

        public int? TrailerCount { get; set; }

        public int ChildCount => (AlbumCount ?? 0) + (ArtistCount ?? 0) + (EpisodeCount ?? 0) + (MovieCount ?? 0) + (MusicVideoCount ?? 0) + (ProgramCount ?? 0) + (SeriesCount ?? 0) + (SongCount ?? 0) + (TrailerCount ?? 0);
    }
}