1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-26 09:49:00 +00:00

Fixed: Add TMDB Collection Id to Kodi NFO

#4442
This commit is contained in:
Qstick 2020-06-03 22:35:19 -04:00
parent 67ff8d39da
commit b00326424f

View file

@ -137,6 +137,7 @@ public override MetadataFileResult MovieMetadata(Movie movie, MovieFile movieFil
details.Add(new XElement("plot", movie.Overview)); details.Add(new XElement("plot", movie.Overview));
details.Add(new XElement("id", movie.ImdbId)); details.Add(new XElement("id", movie.ImdbId));
details.Add(new XElement("tmdbid", movie.TmdbId));
if (movie.ImdbId.IsNotNullOrWhiteSpace()) if (movie.ImdbId.IsNotNullOrWhiteSpace())
{ {
@ -171,6 +172,15 @@ public override MetadataFileResult MovieMetadata(Movie movie, MovieFile movieFil
details.Add(setElement); details.Add(setElement);
} }
if (movie.Collection?.TmdbId > 0)
{
details.Add(new XElement("tmdbCollectionId", movie.Collection.TmdbId));
var uniqueSetId = new XElement("uniqueid", movie.Collection.TmdbId);
uniqueSetId.SetAttributeValue("type", "tmdbSet");
details.Add(uniqueSetId);
}
foreach (var genre in movie.Genres) foreach (var genre in movie.Genres)
{ {
details.Add(new XElement("genre", genre)); details.Add(new XElement("genre", genre));