LazyLoaded Series and Episode again for history

pull/2/head
Mark McDowall 12 years ago
parent 17e99958e1
commit 68f93dbb10

@ -65,8 +65,8 @@ namespace NzbDrone.Api.History
{ {
Id = 1, Id = 1,
Date = DateTime.UtcNow.AddHours(-5), Date = DateTime.UtcNow.AddHours(-5),
Episode = episode, // Episode = episode,
Series = series, // Series = series,
Indexer = "nzbs.org", Indexer = "nzbs.org",
Quality = new QualityModel(Quality.HDTV720p) Quality = new QualityModel(Quality.HDTV720p)
} }

@ -38,10 +38,10 @@ namespace NzbDrone.Core.Datastore
Mapper.Entity<SceneMapping>().RegisterModel("SceneMappings"); Mapper.Entity<SceneMapping>().RegisterModel("SceneMappings");
Mapper.Entity<History.History>().RegisterModel("History"); Mapper.Entity<History.History>().RegisterModel("History")
// .Relationship() .Relationship()
// .HasOne(h => h.Episode, h => h.EpisodeId) .HasOne(h => h.Episode, h => h.EpisodeId)
// .HasOne(h => h.Series, h => h.SeriesId); .HasOne(h => h.Series, h => h.SeriesId);
Mapper.Entity<Series>().RegisterModel("Series") Mapper.Entity<Series>().RegisterModel("Series")
.Ignore(s => s.Path) .Ignore(s => s.Path)

@ -17,7 +17,7 @@ namespace NzbDrone.Core.History
public string NzbInfoUrl { get; set; } public string NzbInfoUrl { get; set; }
public string ReleaseGroup { get; set; } public string ReleaseGroup { get; set; }
public Episode Episode { get; set; } public LazyLoaded<Episode> Episode { get; set; }
public Series Series { get; set; } public LazyLoaded<Series> Series { get; set; }
} }
} }
Loading…
Cancel
Save