From f986e8d1329ae59fc864fbeab2fafff551ff750d Mon Sep 17 00:00:00 2001 From: "Jamie.Rees" Date: Tue, 26 Sep 2017 15:02:20 +0100 Subject: [PATCH] #1513 !wip when we have every episode of a series, we now mark as available. --- src/Ombi.Core/Engine/TvSearchEngine.cs | 7 ++++-- .../Models/Search/SearchTvShowViewModel.cs | 5 ++++ .../app/search/seriesinformation.component.ts | 1 - .../app/search/tvsearch.component.html | 24 ++++--------------- .../app/settings/update/update.component.ts | 2 +- 5 files changed, 16 insertions(+), 23 deletions(-) diff --git a/src/Ombi.Core/Engine/TvSearchEngine.cs b/src/Ombi.Core/Engine/TvSearchEngine.cs index 862dde5a5..34b49289c 100644 --- a/src/Ombi.Core/Engine/TvSearchEngine.cs +++ b/src/Ombi.Core/Engine/TvSearchEngine.cs @@ -202,7 +202,6 @@ namespace Ombi.Core.Engine } } } - } if (plexSettings.Enable) { @@ -230,12 +229,15 @@ namespace Ombi.Core.Engine } } } + } + if (item.SeasonRequests.Any() && item.SeasonRequests.All(x => x.Episodes.All(e => e.Approved))) + { + item.FullyAvailable = true; } if (item.Id > 0) { - // TODO need to check if the episodes are available var tvdbid = item.Id; if (existingRequests.ContainsKey(tvdbid)) { @@ -269,6 +271,7 @@ namespace Ombi.Core.Engine } } } + // TODO CHECK SONARR/RADARR //if (sonarrCached.Select(x => x.TvdbId).Contains(tvdbid) || sickRageCache.Contains(tvdbid)) // // compare to the sonarr/sickrage db //{ diff --git a/src/Ombi.Core/Models/Search/SearchTvShowViewModel.cs b/src/Ombi.Core/Models/Search/SearchTvShowViewModel.cs index 4f778d8ea..c7bbac246 100644 --- a/src/Ombi.Core/Models/Search/SearchTvShowViewModel.cs +++ b/src/Ombi.Core/Models/Search/SearchTvShowViewModel.cs @@ -49,5 +49,10 @@ namespace Ombi.Core.Models.Search public bool FirstSeason { get; set; } public bool LatestSeason { get; set; } + + /// + /// This is where we have EVERY Episode for that series + /// + public bool FullyAvailable { get; set; } } } \ No newline at end of file diff --git a/src/Ombi/ClientApp/app/search/seriesinformation.component.ts b/src/Ombi/ClientApp/app/search/seriesinformation.component.ts index c8857bac8..8fb6c1650 100644 --- a/src/Ombi/ClientApp/app/search/seriesinformation.component.ts +++ b/src/Ombi/ClientApp/app/search/seriesinformation.component.ts @@ -42,7 +42,6 @@ export class SeriesInformationComponent implements OnInit, OnDestroy { this.requestService.requestTv(this.series) .takeUntil(this.subscriptions) .subscribe(x => { - debugger; this.result = x as IRequestEngineResult; if (this.result.requestAdded) { this.notificationService.success("Request Added", diff --git a/src/Ombi/ClientApp/app/search/tvsearch.component.html b/src/Ombi/ClientApp/app/search/tvsearch.component.html index a6e6ae7fb..06a261720 100644 --- a/src/Ombi/ClientApp/app/search/tvsearch.component.html +++ b/src/Ombi/ClientApp/app/search/tvsearch.component.html @@ -80,24 +80,7 @@
- - - -