diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-05-29 02:03:09 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-05-29 02:03:09 -0400 |
| commit | 88415471eb609bc3c7c4189005780c30614fd6a9 (patch) | |
| tree | 129c6f7114d5ef9b1c100d4c6cf43d8a5fb18d35 /MediaBrowser.Controller/Entities/Trailer.cs | |
| parent | 2e2766bd19d6d974abe11284cc065ee7692ae1ed (diff) | |
add trakt external url
Diffstat (limited to 'MediaBrowser.Controller/Entities/Trailer.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Trailer.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/Trailer.cs b/MediaBrowser.Controller/Entities/Trailer.cs index 3be2fc624..74645bbe9 100644 --- a/MediaBrowser.Controller/Entities/Trailer.cs +++ b/MediaBrowser.Controller/Entities/Trailer.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Globalization; using System.Runtime.Serialization; using MediaBrowser.Controller.Entities.Movies; +using MediaBrowser.Model.Providers; namespace MediaBrowser.Controller.Entities { @@ -110,5 +111,22 @@ namespace MediaBrowser.Controller.Entities return hasChanges; } + + public override List<ExternalUrl> GetRelatedUrls() + { + var list = base.GetRelatedUrls(); + + var imdbId = this.GetProviderId(MetadataProviders.Imdb); + if (!string.IsNullOrWhiteSpace(imdbId)) + { + list.Add(new ExternalUrl + { + Name = "Trakt", + Url = string.Format("https://trakt.tv/movies/{0}", imdbId) + }); + } + + return list; + } } } |
