From 9c5f2ef2f1de376bd170d59f049558cebe363eb9 Mon Sep 17 00:00:00 2001 From: Blatzar <46196380+Blatzar@users.noreply.github.com> Date: Sun, 11 Sep 2022 13:37:44 +0200 Subject: [PATCH 1/2] Fix GMPlayer --- .../main/java/com/lagradost/cloudstream3/extractors/GMPlayer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/extractors/GMPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/extractors/GMPlayer.kt index 9078f389..af02ee8a 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/extractors/GMPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/extractors/GMPlayer.kt @@ -31,7 +31,7 @@ class GMPlayer : ExtractorApi() { this.name, this.name, m3u8, - "", + ref, Qualities.Unknown.value, headers = mapOf("accept" to "*/*"), isM3u8 = true From 6f60298fc940ccc3dfb98ecc355e30fc4ef3f540 Mon Sep 17 00:00:00 2001 From: Blatzar <46196380+Blatzar@users.noreply.github.com> Date: Sun, 11 Sep 2022 13:43:05 +0200 Subject: [PATCH 2/2] Fix selecting homepage --- .../com/lagradost/cloudstream3/ui/home/HomeViewModel.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeViewModel.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeViewModel.kt index 1d6ed584..6254cb9b 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeViewModel.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeViewModel.kt @@ -272,12 +272,13 @@ class HomeViewModel : ViewModel() { if (!forceReload && api?.let { expandable[it.name]?.list?.list?.isNotEmpty() } == true) { return@launchSafe } - // If the plugin isn't loaded yet. (Does not set the key) - if (api == null) { - loadAndCancel(noneApi) - } else if (preferredApiName == noneApi.name) { + + if (preferredApiName == noneApi.name) { setKey(USER_SELECTED_HOMEPAGE_API, noneApi.name) loadAndCancel(noneApi) + // If the plugin isn't loaded yet. (Does not set the key) + } else if (api == null) { + loadAndCancel(noneApi) } else if (preferredApiName == randomApi.name) { val validAPIs = context?.filterProviderByPreferredMedia() if (validAPIs.isNullOrEmpty()) {