TvExternalIds.cs 1.9 KB

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