Fixed: Partial library updates for Plex Media Server 1.3

This commit is contained in:
Mark McDowall 2016-12-07 12:54:04 -08:00
parent f022dae1fa
commit 3f64c01d5b
3 changed files with 7 additions and 5 deletions

View File

@ -17,12 +17,13 @@ namespace NzbDrone.Core.Notifications.Plex.Models
public string Type { get; set; } public string Type { get; set; }
public string Language { get; set; } public string Language { get; set; }
public PlexSectionLocation Location { get; set; } [JsonProperty("Location")]
public List<PlexSectionLocation> Locations { get; set; }
} }
public class PlexSectionsContainer public class PlexSectionsContainer
{ {
[JsonProperty("Metadata")] [JsonProperty("Directory")]
public List<PlexSection> Sections { get; set; } public List<PlexSection> Sections { get; set; }
} }

View File

@ -13,7 +13,8 @@ namespace NzbDrone.Core.Notifications.Plex.Models
public class PlexSectionResponse public class PlexSectionResponse
{ {
public List<PlexSectionItem> Metadata { get; set; } [JsonProperty("Metadata")]
public List<PlexSectionItem> Items { get; set; }
} }
public class PlexSectionResponseLegacy public class PlexSectionResponseLegacy

View File

@ -53,7 +53,7 @@ namespace NzbDrone.Core.Notifications.Plex
{ {
Id = s.Id, Id = s.Id,
Language = s.Language, Language = s.Language,
Location = s.Locations.FirstOrDefault(), Locations = s.Locations,
Type = s.Type Type = s.Type
}) })
.ToList(); .ToList();
@ -151,7 +151,7 @@ namespace NzbDrone.Core.Notifications.Plex
{ {
items = Json.Deserialize<PlexResponse<PlexSectionResponse>>(response.Content) items = Json.Deserialize<PlexResponse<PlexSectionResponse>>(response.Content)
.MediaContainer .MediaContainer
.Metadata; .Items;
} }
if (items == null || items.Empty()) if (items == null || items.Empty())