Merge branch 'develop'
This commit is contained in:
commit
190f7df38f
|
@ -16,6 +16,8 @@ namespace NzbDrone.Core.Notifications.Plex
|
||||||
|
|
||||||
[JsonProperty("_children")]
|
[JsonProperty("_children")]
|
||||||
public List<PlexSection> Sections { get; set; }
|
public List<PlexSection> Sections { get; set; }
|
||||||
|
|
||||||
|
public Int32 Key { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PlexMediaContainer
|
public class PlexMediaContainer
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace NzbDrone.Core.Notifications.Plex
|
||||||
{
|
{
|
||||||
public interface IPlexServerProxy
|
public interface IPlexServerProxy
|
||||||
{
|
{
|
||||||
List<PlexSection> GetTvSections(PlexServerSettings settings);
|
List<PlexDirectory> GetTvSections(PlexServerSettings settings);
|
||||||
void Update(int sectionId, PlexServerSettings settings);
|
void Update(int sectionId, PlexServerSettings settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ namespace NzbDrone.Core.Notifications.Plex
|
||||||
_authCache = cacheManager.GetCache<String>(GetType(), "authCache");
|
_authCache = cacheManager.GetCache<String>(GetType(), "authCache");
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<PlexSection> GetTvSections(PlexServerSettings settings)
|
public List<PlexDirectory> GetTvSections(PlexServerSettings settings)
|
||||||
{
|
{
|
||||||
var request = GetPlexServerRequest("library/sections", Method.GET, settings);
|
var request = GetPlexServerRequest("library/sections", Method.GET, settings);
|
||||||
var client = GetPlexServerClient(settings);
|
var client = GetPlexServerClient(settings);
|
||||||
|
@ -35,7 +35,6 @@ namespace NzbDrone.Core.Notifications.Plex
|
||||||
return Json.Deserialize<PlexMediaContainer>(response.Content)
|
return Json.Deserialize<PlexMediaContainer>(response.Content)
|
||||||
.Directories
|
.Directories
|
||||||
.Where(d => d.Type == "show")
|
.Where(d => d.Type == "show")
|
||||||
.SelectMany(d => d.Sections)
|
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace NzbDrone.Core.Notifications.Plex
|
||||||
{
|
{
|
||||||
_logger.Debug("Getting sections from Plex host: {0}", settings.Host);
|
_logger.Debug("Getting sections from Plex host: {0}", settings.Host);
|
||||||
|
|
||||||
return _plexServerProxy.GetTvSections(settings).Select(s => s.Id).ToList();
|
return _plexServerProxy.GetTvSections(settings).Select(s => s.Key).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSection(int key, PlexServerSettings settings)
|
private void UpdateSection(int key, PlexServerSettings settings)
|
||||||
|
|
|
@ -163,7 +163,6 @@ namespace NzbDrone.Core.Parser
|
||||||
|
|
||||||
if (match.Count != 0)
|
if (match.Count != 0)
|
||||||
{
|
{
|
||||||
Console.WriteLine(regex);
|
|
||||||
Logger.Trace(regex);
|
Logger.Trace(regex);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue