mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
More unit tests around the login and also the core Plex Checker
This commit is contained in:
parent
4eff175424
commit
13324cac14
7 changed files with 690 additions and 468 deletions
|
@ -48,8 +48,6 @@ using PlexRequests.Store.Repository;
|
|||
|
||||
using Quartz;
|
||||
|
||||
using Action = PlexRequests.Helpers.Analytics.Action;
|
||||
|
||||
namespace PlexRequests.Services.Jobs
|
||||
{
|
||||
public class PlexAvailabilityChecker : IJob, IAvailabilityChecker
|
||||
|
@ -202,7 +200,8 @@ namespace PlexRequests.Services.Jobs
|
|||
var libs = Cache.Get<List<PlexSearch>>(CacheKeys.PlexLibaries);
|
||||
if (libs != null)
|
||||
{
|
||||
var tvLibs = libs.Where(x =>
|
||||
var withDir = libs.Where(x => x.Directory != null);
|
||||
var tvLibs = withDir.Where(x =>
|
||||
x.Directory.Any(y =>
|
||||
y.Type.Equals(PlexMediaType.Show.ToString(), StringComparison.CurrentCultureIgnoreCase)
|
||||
)
|
||||
|
@ -215,7 +214,7 @@ namespace PlexRequests.Services.Jobs
|
|||
Title = x.Title,
|
||||
ReleaseYear = x.Year,
|
||||
ProviderId = x.ProviderId,
|
||||
Seasons = x.Seasons.Select(d => PlexHelper.GetSeasonNumberFromTitle(d.Title)).ToArray()
|
||||
Seasons = x.Seasons?.Select(d => PlexHelper.GetSeasonNumberFromTitle(d.Title)).ToArray()
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue