aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2022-01-11 16:11:25 -0700
committerGitHub <noreply@github.com>2022-01-11 16:11:25 -0700
commita0f248e2002bc3033b443fd9bc4d47cd23df8364 (patch)
tree6ca1518da70f1f18b7dc961eb4ff55fab98eb6a7
parent307679afef158f3a9952aec40a4221fcea5f8a82 (diff)
parent9574d13059357f61af9ee7beda05448099cf2c39 (diff)
Merge pull request #7134 from adavier/trakt-episode-links
-rw-r--r--MediaBrowser.Controller/Entities/TV/Episode.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs
index df47daedf..c8a0e21eb 100644
--- a/MediaBrowser.Controller/Entities/TV/Episode.cs
+++ b/MediaBrowser.Controller/Entities/TV/Episode.cs
@@ -11,6 +11,7 @@ using Jellyfin.Data.Enums;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
+using MediaBrowser.Model.Providers;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Controller.Entities.TV
@@ -337,5 +338,22 @@ namespace MediaBrowser.Controller.Entities.TV
return hasChanges;
}
+
+ public override List<ExternalUrl> GetRelatedUrls()
+ {
+ var list = base.GetRelatedUrls();
+
+ var imdbId = this.GetProviderId(MetadataProvider.Imdb);
+ if (!string.IsNullOrEmpty(imdbId))
+ {
+ list.Add(new ExternalUrl
+ {
+ Name = "Trakt",
+ Url = string.Format(CultureInfo.InvariantCulture, "https://trakt.tv/episodes/{0}", imdbId)
+ });
+ }
+
+ return list;
+ }
}
}