mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 12:32:31 +01:00
Fixed: Partial library updates for Plex Media Server 1.3
This commit is contained in:
parent
52ad8cf37f
commit
f022dae1fa
@ -13,7 +13,7 @@ public class PlexSectionItem
|
|||||||
|
|
||||||
public class PlexSectionResponse
|
public class PlexSectionResponse
|
||||||
{
|
{
|
||||||
public List<PlexSectionItem> Items { get; set; }
|
public List<PlexSectionItem> Metadata { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PlexSectionResponseLegacy
|
public class PlexSectionResponseLegacy
|
||||||
|
@ -99,10 +99,13 @@ public string Version(PlexServerSettings settings)
|
|||||||
|
|
||||||
if (response.Content.Contains("_children"))
|
if (response.Content.Contains("_children"))
|
||||||
{
|
{
|
||||||
return Json.Deserialize<PlexIdentity>(response.Content).Version;
|
return Json.Deserialize<PlexIdentity>(response.Content)
|
||||||
|
.Version;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Json.Deserialize<PlexResponse<PlexIdentity>>(response.Content).MediaContainer.Version;
|
return Json.Deserialize<PlexResponse<PlexIdentity>>(response.Content)
|
||||||
|
.MediaContainer
|
||||||
|
.Version;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<PlexPreference> Preferences(PlexServerSettings settings)
|
public List<PlexPreference> Preferences(PlexServerSettings settings)
|
||||||
@ -116,10 +119,13 @@ public List<PlexPreference> Preferences(PlexServerSettings settings)
|
|||||||
|
|
||||||
if (response.Content.Contains("_children"))
|
if (response.Content.Contains("_children"))
|
||||||
{
|
{
|
||||||
return Json.Deserialize<PlexPreferencesLegacy>(response.Content).Preferences;
|
return Json.Deserialize<PlexPreferencesLegacy>(response.Content)
|
||||||
|
.Preferences;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Json.Deserialize<PlexResponse<PlexPreferences>>(response.Content).MediaContainer.Preferences;
|
return Json.Deserialize<PlexResponse<PlexPreferences>>(response.Content)
|
||||||
|
.MediaContainer
|
||||||
|
.Preferences;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int? GetMetadataId(int sectionId, int tvdbId, string language, PlexServerSettings settings)
|
public int? GetMetadataId(int sectionId, int tvdbId, string language, PlexServerSettings settings)
|
||||||
@ -143,8 +149,9 @@ public List<PlexPreference> Preferences(PlexServerSettings settings)
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
items = Json.Deserialize<PlexSectionResponse>(response.Content)
|
items = Json.Deserialize<PlexResponse<PlexSectionResponse>>(response.Content)
|
||||||
.Items;
|
.MediaContainer
|
||||||
|
.Metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (items == null || items.Empty())
|
if (items == null || items.Empty())
|
||||||
|
Loading…
Reference in New Issue
Block a user