EpisodeInfo.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. namespace MediaBrowser.Controller.Providers
  7. {
  8. public class EpisodeInfo : ItemLookupInfo, IHasIdentities<EpisodeIdentity>
  9. {
  10. private List<EpisodeIdentity> _identities = new List<EpisodeIdentity>();
  11. public Dictionary<string, string> SeriesProviderIds { get; set; }
  12. public int? IndexNumberEnd { get; set; }
  13. public int? AnimeSeriesIndex { get; set; }
  14. public EpisodeInfo()
  15. {
  16. SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
  17. }
  18. public IEnumerable<EpisodeIdentity> Identities
  19. {
  20. get { return _identities; }
  21. }
  22. public async Task FindIdentities(IProviderManager providerManager, CancellationToken cancellationToken)
  23. {
  24. var identifier = new ItemIdentifier<EpisodeInfo, EpisodeIdentity>();
  25. _identities = (await identifier.FindIdentities(this, providerManager, cancellationToken)).ToList();
  26. }
  27. }
  28. }