From 4071b2e8a215e5e5dfe60b617080c7e4c48d7e36 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 7 May 2021 14:41:10 +0100 Subject: [PATCH] Added the open on mobile back in, this will be available in the next app update --- .../Rules/Search/AvailabilityRuleHelper.cs | 2 +- .../Rule/Rules/Search/PlexAvailabilityRule.cs | 4 +-- .../user-preference.component.html | 28 +++++++++++-------- .../user-preference.component.ts | 7 +++++ 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/Ombi.Core/Rule/Rules/Search/AvailabilityRuleHelper.cs b/src/Ombi.Core/Rule/Rules/Search/AvailabilityRuleHelper.cs index 71331c51d..c3de20798 100644 --- a/src/Ombi.Core/Rule/Rules/Search/AvailabilityRuleHelper.cs +++ b/src/Ombi.Core/Rule/Rules/Search/AvailabilityRuleHelper.cs @@ -13,7 +13,7 @@ namespace Ombi.Core.Rule.Rules.Search { public static void CheckForUnairedEpisodes(SearchTvShowViewModel search) { - foreach (var season in search.SeasonRequests) + foreach (var season in search.SeasonRequests.ToList()) { // If we have all the episodes for this season, then this season is available if (season.Episodes.All(x => x.Available)) diff --git a/src/Ombi.Core/Rule/Rules/Search/PlexAvailabilityRule.cs b/src/Ombi.Core/Rule/Rules/Search/PlexAvailabilityRule.cs index 7b757802d..68551aac4 100644 --- a/src/Ombi.Core/Rule/Rules/Search/PlexAvailabilityRule.cs +++ b/src/Ombi.Core/Rule/Rules/Search/PlexAvailabilityRule.cs @@ -85,9 +85,9 @@ namespace Ombi.Core.Rule.Rules.Search if (search.SeasonRequests.Any()) { var allEpisodes = PlexContentRepository.GetAllEpisodes(); - foreach (var season in search.SeasonRequests) + foreach (var season in search.SeasonRequests.ToList()) { - foreach (var episode in season.Episodes) + foreach (var episode in season.Episodes.ToList()) { await AvailabilityRuleHelper.SingleEpisodeCheck(useImdb, allEpisodes, episode, season, item, useTheMovieDb, useTvDb, Log); } diff --git a/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.html b/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.html index b809a510d..ab9f7bf0c 100644 --- a/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.html +++ b/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.html @@ -52,19 +52,25 @@
-
-
-
- Get it on Google Play + +
+
+ Get it on Google Play +
+
+ Get it on Google Play +
+
+ +
+
-
- Get it on Google Play -
-
+ diff --git a/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.ts b/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.ts index ae68055a6..eb504065c 100644 --- a/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.ts +++ b/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.ts @@ -120,6 +120,13 @@ export class UserPreferenceComponent implements OnInit { }) } + public openMobileApp(event: any) { + event.preventDefault(); + + const url = `ombi://${this.qrCode}`; + window.location.assign(url); + } + private welcomeText: string; private setWelcomeText() {