1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

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 @@ public class PlexSection
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; }
}

View File

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

View File

@ -53,7 +53,7 @@ public List<PlexSection> GetTvSections(PlexServerSettings settings)
{
Id = s.Id,
Language = s.Language,
Location = s.Locations.FirstOrDefault(),
Locations = s.Locations,
Type = s.Type
})
.ToList();
@ -151,7 +151,7 @@ public List<PlexPreference> Preferences(PlexServerSettings settings)
{
items = Json.Deserialize<PlexResponse<PlexSectionResponse>>(response.Content)
.MediaContainer
.Metadata;
.Items;
}
if (items == null || items.Empty())