aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers/TV
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Providers/TV')
-rw-r--r--MediaBrowser.Providers/TV/Zap2ItExternalId.cs3
-rw-r--r--MediaBrowser.Providers/TV/Zap2ItExternalUrlProvider.cs25
2 files changed, 25 insertions, 3 deletions
diff --git a/MediaBrowser.Providers/TV/Zap2ItExternalId.cs b/MediaBrowser.Providers/TV/Zap2ItExternalId.cs
index 3cb18e424..8907d7744 100644
--- a/MediaBrowser.Providers/TV/Zap2ItExternalId.cs
+++ b/MediaBrowser.Providers/TV/Zap2ItExternalId.cs
@@ -19,9 +19,6 @@ namespace MediaBrowser.Providers.TV
public ExternalIdMediaType? Type => null;
/// <inheritdoc />
- public string UrlFormatString => "http://tvlistings.zap2it.com/overview.html?programSeriesId={0}";
-
- /// <inheritdoc />
public bool Supports(IHasProviderIds item) => item is Series;
}
}
diff --git a/MediaBrowser.Providers/TV/Zap2ItExternalUrlProvider.cs b/MediaBrowser.Providers/TV/Zap2ItExternalUrlProvider.cs
new file mode 100644
index 000000000..f6516fdde
--- /dev/null
+++ b/MediaBrowser.Providers/TV/Zap2ItExternalUrlProvider.cs
@@ -0,0 +1,25 @@
+using System.Collections.Generic;
+using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Providers;
+using MediaBrowser.Model.Entities;
+
+namespace MediaBrowser.Providers.TV;
+
+/// <summary>
+/// External URLs for TMDb.
+/// </summary>
+public class Zap2ItExternalUrlProvider : IExternalUrlProvider
+{
+ /// <inheritdoc/>
+ public string Name => "Zap2It";
+
+ /// <inheritdoc/>
+ public IEnumerable<string> GetExternalUrls(BaseItem item)
+ {
+ var externalId = item.GetProviderId(MetadataProvider.Zap2It);
+ if (!string.IsNullOrEmpty(externalId))
+ {
+ yield return $"http://tvlistings.zap2it.com/overview.html?programSeriesId={externalId}";
+ }
+ }
+}