diff --git a/src/NzbDrone.Core/Datastore/Migration/041_fix_xbmc_season_images_metadata.cs b/src/NzbDrone.Core/Datastore/Migration/041_fix_xbmc_season_images_metadata.cs new file mode 100644 index 000000000..25cbc8ed4 --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/041_fix_xbmc_season_images_metadata.cs @@ -0,0 +1,14 @@ +using FluentMigrator; +using NzbDrone.Core.Datastore.Migration.Framework; + +namespace NzbDrone.Core.Datastore.Migration +{ + [Migration(41)] + public class fix_xbmc_season_images_metadata : NzbDroneMigrationBase + { + protected override void MainDbUpgrade() + { + Execute.Sql("UPDATE MetadataFiles SET Type = 4 WHERE Consumer = 'XbmcMetadata' AND SeasonNumber IS NOT NULL"); + } + } +} diff --git a/src/NzbDrone.Core/MetaData/Consumers/Xbmc/XbmcMetadata.cs b/src/NzbDrone.Core/MetaData/Consumers/Xbmc/XbmcMetadata.cs index a4d5ac080..e9f58aa39 100644 --- a/src/NzbDrone.Core/MetaData/Consumers/Xbmc/XbmcMetadata.cs +++ b/src/NzbDrone.Core/MetaData/Consumers/Xbmc/XbmcMetadata.cs @@ -217,7 +217,7 @@ private void WriteTvShowNfo(Series series, List existingMetadataFi tvShow.Add(new XElement("actor", new XElement("name", actor.Name), new XElement("role", actor.Character), - new XElement("thumb", actor.Images.First()) + new XElement("thumb", actor.Images.First().Url) )); } @@ -296,7 +296,7 @@ private void WriteSeasonImages(Series series, List existingMetadat SeriesId = series.Id, SeasonNumber = season.SeasonNumber, Consumer = GetType().Name, - Type = MetadataType.SeriesMetadata, + Type = MetadataType.SeasonImage, RelativePath = DiskProviderBase.GetRelativePath(series.Path, path) }; diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj index 92c3429c2..89cb0b967 100644 --- a/src/NzbDrone.Core/NzbDrone.Core.csproj +++ b/src/NzbDrone.Core/NzbDrone.Core.csproj @@ -197,6 +197,7 @@ +