From e07b588fd88d71f82837615288d0b5f1b4169525 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 5 Sep 2013 23:25:34 -0700 Subject: [PATCH] SceneMapping uses new API endpoint --- NzbDrone.Core/DataAugmentation/Scene/SceneMapping.cs | 6 +++--- NzbDrone.Core/DataAugmentation/Scene/SceneMappingProxy.cs | 2 +- NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/NzbDrone.Core/DataAugmentation/Scene/SceneMapping.cs b/NzbDrone.Core/DataAugmentation/Scene/SceneMapping.cs index 011096f15..07bdfc065 100644 --- a/NzbDrone.Core/DataAugmentation/Scene/SceneMapping.cs +++ b/NzbDrone.Core/DataAugmentation/Scene/SceneMapping.cs @@ -5,15 +5,15 @@ namespace NzbDrone.Core.DataAugmentation.Scene { public class SceneMapping : ModelBase { - [JsonProperty("CleanTitle")] + [JsonProperty("title")] public string ParseTerm { get; set; } - [JsonProperty("Title")] + [JsonProperty("searchTitle")] public string SearchTerm { get; set; } - [JsonProperty("Id")] public int TvdbId { get; set; } + [JsonProperty("season")] public int SeasonNumber { get; set; } } } \ No newline at end of file diff --git a/NzbDrone.Core/DataAugmentation/Scene/SceneMappingProxy.cs b/NzbDrone.Core/DataAugmentation/Scene/SceneMappingProxy.cs index 2447a96ec..76af4de7e 100644 --- a/NzbDrone.Core/DataAugmentation/Scene/SceneMappingProxy.cs +++ b/NzbDrone.Core/DataAugmentation/Scene/SceneMappingProxy.cs @@ -21,7 +21,7 @@ public SceneMappingProxy(IHttpProvider httpProvider) public List Fetch() { - var mappingsJson = _httpProvider.DownloadString(Services.RootUrl + "/SceneMapping/Active"); + var mappingsJson = _httpProvider.DownloadString(Services.RootUrl + "/v1/SceneMapping"); return Json.Deserialize>(mappingsJson); } } diff --git a/NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs b/NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs index 3c84d378c..5e6c2a6af 100644 --- a/NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs +++ b/NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs @@ -44,7 +44,6 @@ public string GetSceneName(int tvdbId) return mapping.SearchTerm; } - public Nullable GetTvDbId(string cleanName) { var mapping = _gettvdbIdCache.Find(cleanName.CleanSeriesTitle()); @@ -55,7 +54,6 @@ public Nullable GetTvDbId(string cleanName) return mapping.TvdbId; } - private void UpdateMappings() { _logger.Info("Updating Scene mapping"); @@ -74,7 +72,6 @@ private void UpdateMappings() } _repository.InsertMany(mappings); - } else {