mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 16:22:55 -07:00
Fixed the NRO error !wip
This commit is contained in:
parent
0cc57c3c1f
commit
2fdfa3be97
3 changed files with 9 additions and 9 deletions
|
@ -9,9 +9,9 @@ using Ombi.Store.Repository.Requests;
|
|||
|
||||
namespace Ombi.Core.Rule.Rules.Search
|
||||
{
|
||||
public abstract class AvailabilityRuleBase : BaseSearchRule
|
||||
public static class AvailabilityRuleHelper
|
||||
{
|
||||
public void CheckForUnairedEpisodes(SearchTvShowViewModel search)
|
||||
public static void CheckForUnairedEpisodes(SearchTvShowViewModel search)
|
||||
{
|
||||
if (search.SeasonRequests.All(x => x.Episodes.All(e => e.Available)))
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ namespace Ombi.Core.Rule.Rules.Search
|
|||
}
|
||||
}
|
||||
|
||||
public async Task SingleEpisodeCheck(bool useImdb, IQueryable<PlexEpisode> allEpisodes, EpisodeRequests episode,
|
||||
public static async Task SingleEpisodeCheck(bool useImdb, IQueryable<PlexEpisode> allEpisodes, EpisodeRequests episode,
|
||||
SeasonRequests season, PlexServerContent item, bool useTheMovieDb, bool useTvDb)
|
||||
{
|
||||
PlexEpisode epExists = null;
|
|
@ -9,7 +9,7 @@ using Ombi.Store.Repository;
|
|||
|
||||
namespace Ombi.Core.Rule.Rules.Search
|
||||
{
|
||||
public class EmbyAvailabilityRule : AvailabilityRuleBase, IRules<SearchViewModel>
|
||||
public class EmbyAvailabilityRule : BaseSearchRule, IRules<SearchViewModel>
|
||||
{
|
||||
public EmbyAvailabilityRule(IEmbyContentRepository repo)
|
||||
{
|
||||
|
@ -73,12 +73,12 @@ namespace Ombi.Core.Rule.Rules.Search
|
|||
{
|
||||
foreach (var episode in season.Episodes)
|
||||
{
|
||||
await SingleEpisodeCheck(useImdb, allEpisodes, episode, season, item, useTheMovieDb, useTvDb);
|
||||
await AvailabilityRuleHelper.SingleEpisodeCheck(useImdb, allEpisodes, episode, season, item, useTheMovieDb, useTvDb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CheckForUnairedEpisodes(search);
|
||||
AvailabilityRuleHelper.CheckForUnairedEpisodes(search);
|
||||
}
|
||||
}
|
||||
return Success();
|
||||
|
|
|
@ -8,7 +8,7 @@ using Ombi.Store.Repository;
|
|||
|
||||
namespace Ombi.Core.Rule.Rules.Search
|
||||
{
|
||||
public class PlexAvailabilityRule : AvailabilityRuleBase, IRules<SearchViewModel>
|
||||
public class PlexAvailabilityRule : BaseSearchRule, IRules<SearchViewModel>
|
||||
{
|
||||
public PlexAvailabilityRule(IPlexContentRepository repo)
|
||||
{
|
||||
|
@ -72,11 +72,11 @@ namespace Ombi.Core.Rule.Rules.Search
|
|||
{
|
||||
foreach (var episode in season.Episodes)
|
||||
{
|
||||
await SingleEpisodeCheck(useImdb, allEpisodes, episode, season, item, useTheMovieDb, useTvDb);
|
||||
await AvailabilityRuleHelper.SingleEpisodeCheck(useImdb, allEpisodes, episode, season, item, useTheMovieDb, useTvDb);
|
||||
}
|
||||
}
|
||||
|
||||
CheckForUnairedEpisodes(search);
|
||||
AvailabilityRuleHelper.CheckForUnairedEpisodes(search);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue