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:
parent
f022dae1fa
commit
3f64c01d5b
@ -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; }
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user