mirror of
https://github.com/Radarr/Radarr
synced 2025-01-03 22:04:43 +00:00
parent
9ffa28f17c
commit
68cd9ab8c8
1 changed files with 4 additions and 5 deletions
|
@ -107,16 +107,15 @@ public List<PlexPreference> Preferences(PlexServerSettings settings)
|
|||
_logger.Trace("Sections response: {0}", response.Content);
|
||||
CheckForError(response, settings);
|
||||
|
||||
var item = Json.Deserialize<PlexSectionResponse>(response.Content)
|
||||
.Items
|
||||
.FirstOrDefault();
|
||||
var items = Json.Deserialize<PlexSectionResponse>(response.Content)
|
||||
.Items;
|
||||
|
||||
if (item == null)
|
||||
if (items == null || items.Empty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return item.Id;
|
||||
return items.First().Id;
|
||||
}
|
||||
|
||||
private string Authenticate(PlexServerSettings settings)
|
||||
|
|
Loading…
Reference in a new issue