From 65804d7739560f3b7b52f501e462456c8bff5b70 Mon Sep 17 00:00:00 2001 From: Blatzar <46196380+Blatzar@users.noreply.github.com> Date: Sun, 31 Jul 2022 16:20:48 +0200 Subject: [PATCH] Fix HDMovie5.kt and None in homepage --- .../com/lagradost/cloudstream3/movieproviders/HDMovie5.kt | 2 +- .../java/com/lagradost/cloudstream3/ui/home/HomeViewModel.kt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/HDMovie5.kt b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/HDMovie5.kt index 3c7a6b66..13837218 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/HDMovie5.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/HDMovie5.kt @@ -8,7 +8,7 @@ import com.lagradost.cloudstream3.utils.loadExtractor import org.jsoup.Jsoup class HDMovie5 : MainAPI() { - override var mainUrl = "https://hdmovie2.art" + override var mainUrl = "https://hdmovie2.click" override var name = "HDMovie" override var lang = "hi" 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 14290fca..9c9bfb36 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 @@ -158,7 +158,7 @@ class HomeViewModel : ViewModel() { val lock: MutableSet = mutableSetOf() - suspend fun expandAndReturn(name: String) : ExpandableHomepageList? { + suspend fun expandAndReturn(name: String): ExpandableHomepageList? { if (lock.contains(name)) return null lock += name @@ -256,6 +256,8 @@ class HomeViewModel : ViewModel() { } else -> Unit } + } else { + _page.postValue(Resource.Success(emptyMap())) } }