Fixed: Partial library updates for Plex Media Server 1.3

pull/4/head
Mark McDowall 8 years ago
parent f022dae1fa
commit 3f64c01d5b

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

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

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

Loading…
Cancel
Save