Couple XBMC Metadata fixes

Fixed: Actor URL for XBMC Metadata
Fixed: Incorrectly storing season images for XBMC metadata
(cherry picked from commit 5b2c3b88c0fdf002bb46a45e85c2f5066cc84877)
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 @@ namespace NzbDrone.Core.Metadata.Consumers.Xbmc
tvShow.Add(new XElement("actor", tvShow.Add(new XElement("actor",
new XElement("name", actor.Name), new XElement("name", actor.Name),
new XElement("role", actor.Character), new XElement("role", actor.Character),
new XElement("thumb", actor.Images.First()) new XElement("thumb", actor.Images.First().Url)
)); ));
} }
@ -296,7 +296,7 @@ namespace NzbDrone.Core.Metadata.Consumers.Xbmc
SeriesId = series.Id, SeriesId = series.Id,
SeasonNumber = season.SeasonNumber, SeasonNumber = season.SeasonNumber,
Consumer = GetType().Name, Consumer = GetType().Name,
Type = MetadataType.SeriesMetadata, Type = MetadataType.SeasonImage,
RelativePath = DiskProviderBase.GetRelativePath(series.Path, path) 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\038_add_on_upgrade_to_notifications.cs" />
<Compile Include="Datastore\Migration\040_add_metadata_to_episodes_and_series.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\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\MigrationContext.cs" />
<Compile Include="Datastore\Migration\Framework\MigrationController.cs" /> <Compile Include="Datastore\Migration\Framework\MigrationController.cs" />
<Compile Include="Datastore\Migration\Framework\MigrationExtension.cs" /> <Compile Include="Datastore\Migration\Framework\MigrationExtension.cs" />