1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00

Couple XBMC Metadata fixes

Fixed: Actor URL for XBMC Metadata
Fixed: Incorrectly storing season images for XBMC metadata
(cherry picked from commit 5b2c3b88c0)
This commit is contained in:
Mark McDowall 2014-02-16 22:41:13 -08:00
parent defa54f15c
commit ba22600412
3 changed files with 17 additions and 2 deletions

View File

@ -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");
}
}
}

View File

@ -217,7 +217,7 @@ private void WriteTvShowNfo(Series series, List<MetadataFile> 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<MetadataFile> existingMetadat
SeriesId = series.Id,
SeasonNumber = season.SeasonNumber,
Consumer = GetType().Name,
Type = MetadataType.SeriesMetadata,
Type = MetadataType.SeasonImage,
RelativePath = DiskProviderBase.GetRelativePath(series.Path, path)
};

View File

@ -197,6 +197,7 @@
<Compile Include="Datastore\Migration\038_add_on_upgrade_to_notifications.cs" />
<Compile Include="Datastore\Migration\040_add_metadata_to_episodes_and_series.cs" />
<Compile Include="Datastore\Migration\039_add_metadata_tables.cs" />
<Compile Include="Datastore\Migration\041_fix_xbmc_season_images_metadata.cs" />
<Compile Include="Datastore\Migration\Framework\MigrationContext.cs" />
<Compile Include="Datastore\Migration\Framework\MigrationController.cs" />
<Compile Include="Datastore\Migration\Framework\MigrationExtension.cs" />