From 3d7c59bc3bfda8cee274edde5a80d1f98abedf5f Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 27 Aug 2018 20:42:32 -0700 Subject: [PATCH] New: Add unique IDs to Kodi metadata Closes #2711 --- .../Extras/Metadata/Consumers/Xbmc/XbmcMetadata.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Extras/Metadata/Consumers/Xbmc/XbmcMetadata.cs b/src/NzbDrone.Core/Extras/Metadata/Consumers/Xbmc/XbmcMetadata.cs index 5126fbf96..25f73b0ea 100644 --- a/src/NzbDrone.Core/Extras/Metadata/Consumers/Xbmc/XbmcMetadata.cs +++ b/src/NzbDrone.Core/Extras/Metadata/Consumers/Xbmc/XbmcMetadata.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -163,6 +163,18 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Xbmc tvShow.Add(new XElement("mpaa", series.Certification)); tvShow.Add(new XElement("id", series.TvdbId)); + var uniqueId = new XElement("uniqueid", series.TvdbId); + uniqueId.SetAttributeValue("type", "tvdb"); + uniqueId.SetAttributeValue("default", true); + tvShow.Add(uniqueId); + + if (series.ImdbId.IsNotNullOrWhiteSpace()) + { + var imdbId = new XElement("uniqueid", series.ImdbId); + imdbId.SetAttributeValue("type", "imdb"); + tvShow.Add(imdbId); + } + foreach (var genre in series.Genres) { tvShow.Add(new XElement("genre", genre));