diff --git a/src/NzbDrone.Core/Notifications/Plex/PlexServerProxy.cs b/src/NzbDrone.Core/Notifications/Plex/PlexServerProxy.cs index cc1011b8d..43658c5f6 100644 --- a/src/NzbDrone.Core/Notifications/Plex/PlexServerProxy.cs +++ b/src/NzbDrone.Core/Notifications/Plex/PlexServerProxy.cs @@ -97,12 +97,12 @@ namespace NzbDrone.Core.Notifications.Plex _logger.Trace("Version response: {0}", response.Content); CheckForError(response, settings); - if (response.Content.Contains("MediaContainer")) + if (response.Content.Contains("_children")) { - return Json.Deserialize>(response.Content).MediaContainer.Version; + return Json.Deserialize(response.Content).Version; } - return Json.Deserialize(response.Content).Version; + return Json.Deserialize>(response.Content).MediaContainer.Version; } public List Preferences(PlexServerSettings settings) @@ -114,12 +114,12 @@ namespace NzbDrone.Core.Notifications.Plex _logger.Trace("Preferences response: {0}", response.Content); CheckForError(response, settings); - if (response.Content.Contains("MediaContainer")) + if (response.Content.Contains("_children")) { - return Json.Deserialize>(response.Content).MediaContainer.Preferences; + return Json.Deserialize(response.Content).Preferences; } - return Json.Deserialize(response.Content).Preferences; + return Json.Deserialize>(response.Content).MediaContainer.Preferences; } public int? GetMetadataId(int sectionId, int tvdbId, string language, PlexServerSettings settings) @@ -240,9 +240,9 @@ namespace NzbDrone.Core.Notifications.Plex throw new PlexAuthenticationException("Unauthorized - Username or password is incorrect"); } - var error = response.Content.Contains("MediaContainer") ? - Json.Deserialize>(response.Content).MediaContainer : - Json.Deserialize(response.Content); + var error = response.Content.Contains("_children") ? + Json.Deserialize(response.Content) : + Json.Deserialize>(response.Content).MediaContainer; if (error != null && !error.Error.IsNullOrWhiteSpace()) {