TvExternalIds.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #pragma warning disable CS1591
  2. using MediaBrowser.Controller.Entities.TV;
  3. using MediaBrowser.Controller.Providers;
  4. using MediaBrowser.Model.Entities;
  5. using MediaBrowser.Model.Providers;
  6. using MediaBrowser.Providers.Plugins.TheTvdb;
  7. namespace MediaBrowser.Providers.TV
  8. {
  9. public class Zap2ItExternalId : IExternalId
  10. {
  11. /// <inheritdoc />
  12. public string ProviderName => "Zap2It";
  13. /// <inheritdoc />
  14. public string Key => MetadataProvider.Zap2It.ToString();
  15. /// <inheritdoc />
  16. public ExternalIdMediaType? Type => null;
  17. /// <inheritdoc />
  18. public string UrlFormatString => "http://tvlistings.zap2it.com/overview.html?programSeriesId={0}";
  19. /// <inheritdoc />
  20. public bool Supports(IHasProviderIds item) => item is Series;
  21. }
  22. public class TvdbExternalId : IExternalId
  23. {
  24. /// <inheritdoc />
  25. public string ProviderName => "TheTVDB";
  26. /// <inheritdoc />
  27. public string Key => MetadataProvider.Tvdb.ToString();
  28. /// <inheritdoc />
  29. public ExternalIdMediaType? Type => null;
  30. /// <inheritdoc />
  31. public string UrlFormatString => TvdbUtils.TvdbBaseUrl + "?tab=series&id={0}";
  32. /// <inheritdoc />
  33. public bool Supports(IHasProviderIds item) => item is Series;
  34. }
  35. public class TvdbSeasonExternalId : IExternalId
  36. {
  37. /// <inheritdoc />
  38. public string ProviderName => "TheTVDB";
  39. /// <inheritdoc />
  40. public string Key => MetadataProvider.Tvdb.ToString();
  41. /// <inheritdoc />
  42. public ExternalIdMediaType? Type => ExternalIdMediaType.Season;
  43. /// <inheritdoc />
  44. public string UrlFormatString => null;
  45. /// <inheritdoc />
  46. public bool Supports(IHasProviderIds item) => item is Season;
  47. }
  48. public class TvdbEpisodeExternalId : IExternalId
  49. {
  50. /// <inheritdoc />
  51. public string ProviderName => "TheTVDB";
  52. /// <inheritdoc />
  53. public string Key => MetadataProvider.Tvdb.ToString();
  54. /// <inheritdoc />
  55. public ExternalIdMediaType? Type => ExternalIdMediaType.Episode;
  56. /// <inheritdoc />
  57. public string UrlFormatString => TvdbUtils.TvdbBaseUrl + "?tab=episode&id={0}";
  58. /// <inheritdoc />
  59. public bool Supports(IHasProviderIds item) => item is Episode;
  60. }
  61. }