fix importing for StevenLu

pull/2/head
Devin Buhl 8 years ago
parent e59db74cad
commit e182d8b964

@ -5,11 +5,6 @@ using System.Xml.Serialization;
namespace NzbDrone.Core.NetImport.StevenLu namespace NzbDrone.Core.NetImport.StevenLu
{ {
public class StevenLuResponse public class StevenLuResponse
{
public Movie[] Movie { get; set; }
}
public class Movie
{ {
public string title { get; set; } public string title { get; set; }
public string imdb_id { get; set; } public string imdb_id { get; set; }

@ -42,7 +42,7 @@ namespace NzbDrone.Core.NetImport.StevenLu
return movies; return movies;
} }
var jsonResponse = JsonConvert.DeserializeObject<StevenLuResponse>(_importResponse.Content); var jsonResponse = JsonConvert.DeserializeObject<List<StevenLuResponse>>(_importResponse.Content);
// no movies were return // no movies were return
if (jsonResponse == null) if (jsonResponse == null)
@ -50,7 +50,7 @@ namespace NzbDrone.Core.NetImport.StevenLu
return movies; return movies;
} }
foreach (var item in jsonResponse.Movie) foreach (var item in jsonResponse)
{ {
movies.AddIfNotNull(new Tv.Movie() movies.AddIfNotNull(new Tv.Movie()
{ {

Loading…
Cancel
Save