aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Providers/EpisodeInfo.cs
blob: 88a7cbab7f424d28a4cbdcea89d7b9faa5dd047b (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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

namespace MediaBrowser.Controller.Providers
{
    public class EpisodeInfo : ItemLookupInfo, IHasIdentities<EpisodeIdentity>
    {
        private List<EpisodeIdentity> _identities = new List<EpisodeIdentity>();

        public Dictionary<string, string> SeriesProviderIds { get; set; }

        public int? IndexNumberEnd { get; set; }
        public int? AnimeSeriesIndex { get; set; }

        public EpisodeInfo()
        {
            SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
        }

        public IEnumerable<EpisodeIdentity> Identities
        {
            get { return _identities; }
        }

        public async Task FindIdentities(IProviderManager providerManager, CancellationToken cancellationToken)
        {
            var identifier = new ItemIdentifier<EpisodeInfo, EpisodeIdentity>();
            _identities = (await identifier.FindIdentities(this, providerManager, cancellationToken)).ToList();
        }
    }
}