1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-26 17:57:43 +00:00

Fixed scene mapping deserialization

This commit is contained in:
Mark McDowall 2013-03-26 22:51:48 -07:00
parent ba4950ea8f
commit 22bbf83e42
2 changed files with 5 additions and 4 deletions

View file

@ -48,7 +48,6 @@ namespace NzbDrone.Core.MetadataSource
public virtual Series GetSeries(int tvDbSeriesId) public virtual Series GetSeries(int tvDbSeriesId)
{ {
var tvDbSeries = _handlerV2.GetSeriesBaseRecord("http://thetvdb.com", tvDbSeriesId); var tvDbSeries = _handlerV2.GetSeriesBaseRecord("http://thetvdb.com", tvDbSeriesId);
var series = new Series(); var series = new Series();
@ -94,13 +93,10 @@ namespace NzbDrone.Core.MetadataSource
} }
return series; return series;
} }
public virtual IList<Episode> GetEpisodes(int tvDbSeriesId) public virtual IList<Episode> GetEpisodes(int tvDbSeriesId)
{ {
var seriesRecord = _handlerV2.GetSeriesFullRecord("http://thetvdb.com", tvDbSeriesId); var seriesRecord = _handlerV2.GetSeriesFullRecord("http://thetvdb.com", tvDbSeriesId);
var tvdbEpisodes = seriesRecord.Episodes.OrderByDescending(e => e.FirstAired).ThenByDescending(e => e.EpisodeName) var tvdbEpisodes = seriesRecord.Episodes.OrderByDescending(e => e.FirstAired).ThenByDescending(e => e.EpisodeName)

View file

@ -1,4 +1,5 @@
using System.Linq; using System.Linq;
using Newtonsoft.Json;
using NzbDrone.Core.Datastore; using NzbDrone.Core.Datastore;
namespace NzbDrone.Core.ReferenceData namespace NzbDrone.Core.ReferenceData
@ -6,7 +7,11 @@ namespace NzbDrone.Core.ReferenceData
public class SceneMapping : ModelBase public class SceneMapping : ModelBase
{ {
public string CleanTitle { get; set; } public string CleanTitle { get; set; }
[JsonProperty("Title")]
public string SceneName { get; set; } public string SceneName { get; set; }
[JsonProperty("Id")]
public int TvdbId { get; set; } public int TvdbId { get; set; }
public int SeasonNumber { get; set; } public int SeasonNumber { get; set; }
} }