mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fixed #840
This commit is contained in:
parent
2870ad435f
commit
be25aea0a7
15 changed files with 53 additions and 32 deletions
|
@ -518,6 +518,7 @@ enum class TvType {
|
|||
OVA,
|
||||
Torrent,
|
||||
Documentary,
|
||||
AsianDrama,
|
||||
}
|
||||
|
||||
// IN CASE OF FUTURE ANIME MOVIE OR SMTH
|
||||
|
|
|
@ -16,7 +16,7 @@ class AsiaFlixProvider : MainAPI() {
|
|||
override val hasQuickSearch = false
|
||||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = false
|
||||
override val supportedTypes = setOf(TvType.TvSeries)
|
||||
override val supportedTypes = setOf(TvType.AsianDrama)
|
||||
|
||||
private val apiUrl = "https://api.asiaflix.app/api/v2"
|
||||
|
||||
|
@ -76,7 +76,7 @@ class AsiaFlixProvider : MainAPI() {
|
|||
name,
|
||||
_id,
|
||||
this@AsiaFlixProvider.name,
|
||||
TvType.TvSeries,
|
||||
TvType.AsianDrama,
|
||||
image,
|
||||
releaseYear,
|
||||
episodes?.size,
|
||||
|
@ -100,7 +100,7 @@ class AsiaFlixProvider : MainAPI() {
|
|||
name,
|
||||
"$mainUrl$dramaUrl/$_id".replace("drama-detail", "show-details"),
|
||||
this@AsiaFlixProvider.name,
|
||||
TvType.TvSeries,
|
||||
TvType.AsianDrama,
|
||||
episodes.mapNotNull { it.toTvSeriesEpisode() }.sortedBy { it.episode },
|
||||
image,
|
||||
releaseYear,
|
||||
|
|
|
@ -20,5 +20,5 @@ class AsianLoadProvider : VidstreamProviderTemplate() {
|
|||
override val iv = "9262859232435825".toByteArray()
|
||||
override val secretKey = "93422192433952489752342908585752".toByteArray()
|
||||
|
||||
override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie)
|
||||
override val supportedTypes = setOf(TvType.AsianDrama)
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.lagradost.cloudstream3.movieproviders
|
|||
import com.fasterxml.jackson.module.kotlin.readValue
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.animeproviders.GogoanimeProvider.Companion.extractVidstream
|
||||
import com.lagradost.cloudstream3.extractors.*
|
||||
import com.lagradost.cloudstream3.extractors.XStreamCdn
|
||||
import com.lagradost.cloudstream3.extractors.helper.AsianEmbedHelper
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.toJson
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
|
@ -16,7 +16,7 @@ class DramaSeeProvider : MainAPI() {
|
|||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = false
|
||||
override val hasDownloadSupport = true
|
||||
override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie)
|
||||
override val supportedTypes = setOf(TvType.AsianDrama)
|
||||
|
||||
override suspend fun getMainPage(): HomePageResponse {
|
||||
val headers = mapOf("X-Requested-By" to "dramasee.net")
|
||||
|
@ -43,7 +43,7 @@ class DramaSeeProvider : MainAPI() {
|
|||
name,
|
||||
link,
|
||||
this.name,
|
||||
TvType.TvSeries,
|
||||
TvType.AsianDrama,
|
||||
image,
|
||||
year = null,
|
||||
id = null,
|
||||
|
@ -173,7 +173,7 @@ class DramaSeeProvider : MainAPI() {
|
|||
name = title,
|
||||
url = url,
|
||||
apiName = this.name,
|
||||
type = TvType.TvSeries,
|
||||
type = TvType.AsianDrama,
|
||||
episodes = episodeList.reversed(),
|
||||
posterUrl = poster,
|
||||
year = year,
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package com.lagradost.cloudstream3.movieproviders
|
||||
|
||||
import android.util.Log
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.extractors.*
|
||||
import com.lagradost.cloudstream3.extractors.XStreamCdn
|
||||
import com.lagradost.cloudstream3.extractors.helper.AsianEmbedHelper
|
||||
import com.lagradost.cloudstream3.mvvm.logError
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
||||
|
@ -20,7 +19,7 @@ class KdramaHoodProvider : MainAPI() {
|
|||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = false
|
||||
override val hasDownloadSupport = true
|
||||
override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie)
|
||||
override val supportedTypes = setOf(TvType.AsianDrama)
|
||||
|
||||
private data class ResponseDatas(
|
||||
@JsonProperty("label") val label: String,
|
||||
|
@ -202,7 +201,7 @@ class KdramaHoodProvider : MainAPI() {
|
|||
name = title,
|
||||
url = url,
|
||||
apiName = this.name,
|
||||
type = TvType.TvSeries,
|
||||
type = TvType.AsianDrama,
|
||||
episodes = episodeList.reversed(),
|
||||
posterUrl = poster,
|
||||
year = year,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.lagradost.cloudstream3.movieproviders
|
||||
|
||||
import android.util.Log
|
||||
import com.fasterxml.jackson.module.kotlin.readValue
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.toJson
|
||||
|
@ -11,12 +10,11 @@ class PinoyHDXyzProvider : MainAPI() {
|
|||
override var name = "Pinoy-HD"
|
||||
override var mainUrl = "https://www.pinoy-hd.xyz"
|
||||
override val lang = "tl"
|
||||
override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries)
|
||||
override val supportedTypes = setOf(TvType.AsianDrama)
|
||||
override val hasDownloadSupport = true
|
||||
override val hasMainPage = true
|
||||
override val hasQuickSearch = false
|
||||
|
||||
|
||||
override suspend fun getMainPage(): HomePageResponse {
|
||||
val all = ArrayList<HomePageList>()
|
||||
val document = app.get(mainUrl, referer = mainUrl).document
|
||||
|
@ -170,7 +168,7 @@ class PinoyHDXyzProvider : MainAPI() {
|
|||
name = title,
|
||||
url = url,
|
||||
apiName = this.name,
|
||||
type = TvType.TvSeries,
|
||||
type = TvType.AsianDrama,
|
||||
episodes = episodeList,
|
||||
posterUrl = poster,
|
||||
year = year,
|
||||
|
|
|
@ -6,13 +6,12 @@ import com.lagradost.cloudstream3.extractors.FEmbed
|
|||
import com.lagradost.cloudstream3.utils.AppUtils.toJson
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||
import java.lang.Exception
|
||||
|
||||
class PinoyMoviePediaProvider : MainAPI() {
|
||||
override var name = "Pinoy Moviepedia"
|
||||
override var mainUrl = "https://pinoymoviepedia.ru"
|
||||
override val lang = "tl"
|
||||
override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries)
|
||||
override val supportedTypes = setOf(TvType.AsianDrama)
|
||||
override val hasDownloadSupport = true
|
||||
override val hasMainPage = true
|
||||
override val hasQuickSearch = false
|
||||
|
@ -188,7 +187,7 @@ class PinoyMoviePediaProvider : MainAPI() {
|
|||
name = title,
|
||||
url = url,
|
||||
apiName = this.name,
|
||||
type = TvType.TvSeries,
|
||||
type = TvType.AsianDrama,
|
||||
episodes = episodeList,
|
||||
posterUrl = poster,
|
||||
year = year,
|
||||
|
|
|
@ -10,13 +10,12 @@ import com.lagradost.cloudstream3.utils.AppUtils.toJson
|
|||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||
import org.jsoup.select.Elements
|
||||
import java.lang.Exception
|
||||
|
||||
class PinoyMoviesEsProvider : MainAPI() {
|
||||
override var name = "Pinoy Movies"
|
||||
override var mainUrl = "https://pinoymovies.es"
|
||||
override val lang = "tl"
|
||||
override val supportedTypes = setOf(TvType.Movie)
|
||||
override val supportedTypes = setOf(TvType.AsianDrama)
|
||||
override val hasDownloadSupport = false
|
||||
override val hasMainPage = true
|
||||
override val hasQuickSearch = false
|
||||
|
|
|
@ -16,7 +16,7 @@ class WatchAsianProvider : MainAPI() {
|
|||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = false
|
||||
override val hasDownloadSupport = true
|
||||
override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie)
|
||||
override val supportedTypes = setOf(TvType.AsianDrama)
|
||||
|
||||
override suspend fun getMainPage(): HomePageResponse {
|
||||
val headers = mapOf("X-Requested-By" to mainUrl)
|
||||
|
@ -187,7 +187,7 @@ class WatchAsianProvider : MainAPI() {
|
|||
name = title,
|
||||
url = url,
|
||||
apiName = this.name,
|
||||
type = TvType.TvSeries,
|
||||
type = TvType.AsianDrama,
|
||||
episodes = episodeList.reversed(),
|
||||
posterUrl = poster,
|
||||
year = year,
|
||||
|
|
|
@ -144,14 +144,16 @@ class HomeFragment : Fragment() {
|
|||
cartoons: MaterialButton?,
|
||||
tvs: MaterialButton?,
|
||||
docs: MaterialButton?,
|
||||
movies: MaterialButton?
|
||||
movies: MaterialButton?,
|
||||
asian: MaterialButton?,
|
||||
): List<Pair<MaterialButton?, List<TvType>>> {
|
||||
return listOf(
|
||||
Pair(anime, listOf(TvType.Anime, TvType.OVA, TvType.AnimeMovie)),
|
||||
Pair(cartoons, listOf(TvType.Cartoon)),
|
||||
Pair(tvs, listOf(TvType.TvSeries)),
|
||||
Pair(docs, listOf(TvType.Documentary)),
|
||||
Pair(movies, listOf(TvType.Movie, TvType.Torrent))
|
||||
Pair(movies, listOf(TvType.Movie, TvType.Torrent)),
|
||||
Pair(asian, listOf(TvType.AsianDrama)),
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -183,10 +185,11 @@ class HomeFragment : Fragment() {
|
|||
val tvs = dialog.findViewById<MaterialButton>(R.id.home_select_tv_series)
|
||||
val docs = dialog.findViewById<MaterialButton>(R.id.home_select_documentaries)
|
||||
val movies = dialog.findViewById<MaterialButton>(R.id.home_select_movies)
|
||||
val asian = dialog.findViewById<MaterialButton>(R.id.home_select_asian)
|
||||
val cancelBtt = dialog.findViewById<MaterialButton>(R.id.cancel_btt)
|
||||
val applyBtt = dialog.findViewById<MaterialButton>(R.id.apply_btt)
|
||||
|
||||
val pairList = getPairList(anime, cartoons, tvs, docs, movies)
|
||||
val pairList = getPairList(anime, cartoons, tvs, docs, movies, asian)
|
||||
|
||||
cancelBtt?.setOnClickListener {
|
||||
dialog.dismissSafe()
|
||||
|
@ -379,6 +382,7 @@ class HomeFragment : Fragment() {
|
|||
Pair(R.string.cartoons, listOf(TvType.Cartoon)),
|
||||
Pair(R.string.anime, listOf(TvType.Anime, TvType.OVA, TvType.AnimeMovie)),
|
||||
Pair(R.string.torrent, listOf(TvType.Torrent)),
|
||||
Pair(R.string.asian_drama, listOf(TvType.AsianDrama)),
|
||||
).filter { item -> currentApi.supportedTypes.any { type -> item.second.contains(type) } }
|
||||
home_provider_meta_info?.text =
|
||||
typeChoices.joinToString(separator = ", ") { getString(it.first) }
|
||||
|
@ -801,7 +805,7 @@ class HomeFragment : Fragment() {
|
|||
if (ctx.isTvSettings()) {
|
||||
home_api_fab?.isVisible = false
|
||||
home_change_api?.isVisible = true
|
||||
if(ctx.isTrueTvSettings()) {
|
||||
if (ctx.isTrueTvSettings()) {
|
||||
home_change_api_loading?.isVisible = true
|
||||
home_change_api_loading?.isFocusable = true
|
||||
home_change_api_loading?.isFocusableInTouchMode = true
|
||||
|
|
|
@ -237,6 +237,7 @@ class ResultFragment : Fragment(), PanelsChildGestureRegionObserver.GestureRegio
|
|||
TvType.Cartoon -> "Cartoons/$titleName"
|
||||
TvType.Torrent -> "Torrent"
|
||||
TvType.Documentary -> "Documentaries"
|
||||
TvType.AsianDrama -> "AsianDrama"
|
||||
}
|
||||
|
||||
val src = "$DOWNLOAD_NAVIGATE_TO/$parentId" // url ?: return@let
|
||||
|
@ -1615,6 +1616,7 @@ class ResultFragment : Fragment(), PanelsChildGestureRegionObserver.GestureRegio
|
|||
TvType.Documentary -> R.string.documentaries_singular
|
||||
TvType.Movie -> R.string.movies_singular
|
||||
TvType.Torrent -> R.string.torrent_singular
|
||||
TvType.AsianDrama -> R.string.asian_drama_singular
|
||||
}
|
||||
)?.let {
|
||||
result_meta_type?.text = it
|
||||
|
|
|
@ -32,7 +32,6 @@ import com.lagradost.cloudstream3.ui.home.HomeFragment.Companion.currentSpan
|
|||
import com.lagradost.cloudstream3.ui.home.HomeFragment.Companion.loadHomepageList
|
||||
import com.lagradost.cloudstream3.ui.home.ParentItemAdapter
|
||||
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTrueTvSettings
|
||||
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTvSettings
|
||||
import com.lagradost.cloudstream3.utils.DataStore.getKey
|
||||
import com.lagradost.cloudstream3.utils.DataStore.setKey
|
||||
import com.lagradost.cloudstream3.utils.UIHelper.dismissSafe
|
||||
|
@ -161,10 +160,11 @@ class SearchFragment : Fragment() {
|
|||
val tvs = dialog.findViewById<MaterialButton>(R.id.home_select_tv_series)
|
||||
val docs = dialog.findViewById<MaterialButton>(R.id.home_select_documentaries)
|
||||
val movies = dialog.findViewById<MaterialButton>(R.id.home_select_movies)
|
||||
val asian = dialog.findViewById<MaterialButton>(R.id.home_select_asian)
|
||||
val cancelBtt = dialog.findViewById<MaterialButton>(R.id.cancel_btt)
|
||||
val applyBtt = dialog.findViewById<MaterialButton>(R.id.apply_btt)
|
||||
|
||||
val pairList = HomeFragment.getPairList(anime, cartoons, tvs, docs, movies)
|
||||
val pairList = HomeFragment.getPairList(anime, cartoons, tvs, docs, movies,asian)
|
||||
|
||||
cancelBtt?.setOnClickListener {
|
||||
dialog.dismissSafe()
|
||||
|
@ -273,7 +273,8 @@ class SearchFragment : Fragment() {
|
|||
search_select_cartoons,
|
||||
search_select_tv_series,
|
||||
search_select_documentaries,
|
||||
search_select_movies
|
||||
search_select_movies,
|
||||
search_select_asian,
|
||||
)
|
||||
|
||||
selectedSearchTypes = context?.getKey<List<String>>(SEARCH_PREF_TAGS)
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:nextFocusLeft="@id/search_select_tv_series"
|
||||
android:nextFocusRight="@id/search_select_cartoons"
|
||||
android:nextFocusRight="@id/search_select_asian"
|
||||
|
||||
android:id="@+id/search_select_anime"
|
||||
android:text="@string/anime"
|
||||
|
@ -119,6 +119,14 @@
|
|||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:nextFocusLeft="@id/search_select_anime"
|
||||
android:nextFocusRight="@id/search_select_cartoons"
|
||||
|
||||
android:id="@+id/search_select_asian"
|
||||
android:text="@string/asian_drama"
|
||||
style="@style/RoundedSelectableButton" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:nextFocusLeft="@id/search_select_asian"
|
||||
android:nextFocusRight="@id/search_select_documentaries"
|
||||
|
||||
android:id="@+id/search_select_cartoons"
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:nextFocusLeft="@id/home_select_tv_series"
|
||||
android:nextFocusRight="@id/home_select_cartoons"
|
||||
android:nextFocusRight="@id/home_select_asian"
|
||||
|
||||
android:id="@+id/home_select_anime"
|
||||
android:text="@string/anime"
|
||||
|
@ -75,6 +75,14 @@
|
|||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:nextFocusLeft="@id/home_select_anime"
|
||||
android:nextFocusRight="@id/home_select_cartoons"
|
||||
|
||||
android:id="@+id/home_select_asian"
|
||||
android:text="@string/asian_drama"
|
||||
style="@style/RoundedSelectableButton" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:nextFocusLeft="@id/home_select_asian"
|
||||
android:nextFocusRight="@id/home_select_documentaries"
|
||||
|
||||
android:id="@+id/home_select_cartoons"
|
||||
|
|
|
@ -286,6 +286,7 @@
|
|||
<string name="torrent">Torrents</string>
|
||||
<string name="documentaries">Documentaries</string>
|
||||
<string name="ova">OVA</string>
|
||||
<string name="asian_drama">Asian Dramas</string>
|
||||
|
||||
<!--singular-->
|
||||
<string name="movies_singular">Movie</string>
|
||||
|
@ -295,6 +296,7 @@
|
|||
<string name="ova_singular">@string/ova</string>
|
||||
<string name="torrent_singular">Torrent</string>
|
||||
<string name="documentaries_singular">Documentary</string>
|
||||
<string name="asian_drama_singular">Asian Drama</string>
|
||||
|
||||
<string name="source_error">Source error</string>
|
||||
<string name="remote_error">Remote error</string>
|
||||
|
|
Loading…
Reference in a new issue