mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
uses better way to filter adult content
This commit is contained in:
parent
cff93c981f
commit
99422ff76b
1 changed files with 21 additions and 21 deletions
|
@ -112,25 +112,25 @@ open class SoraStream : TmdbProvider() {
|
|||
}
|
||||
|
||||
override val mainPage = mainPageOf(
|
||||
"$tmdbAPI/trending/all/day?api_key=$apiKey®ion=&page=" to "Trending",
|
||||
"$tmdbAPI/movie/popular?api_key=$apiKey®ion=&without_keywords=190370|13059|226161&page=" to "Popular Movies",
|
||||
"$tmdbAPI/tv/popular?api_key=$apiKey®ion=&without_keywords=190370&page=" to "Popular TV Shows",
|
||||
"$tmdbAPI/tv/airing_today?api_key=$apiKey®ion=&page=" to "Airing Today TV Shows",
|
||||
// "$tmdbAPI/tv/on_the_air?api_key=$apiKey®ion=&page=" to "On The Air TV Shows",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_networks=213&page=" to "Netflix",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_networks=1024&page=" to "Amazon",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_networks=2739&page=" to "Disney+",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_networks=453&page=" to "Hulu",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_networks=2552&page=" to "Apple TV+",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_networks=49&page=" to "HBO",
|
||||
"$tmdbAPI/movie/top_rated?api_key=$apiKey®ion=&page=" to "Top Rated Movies",
|
||||
"$tmdbAPI/tv/top_rated?api_key=$apiKey®ion=&page=" to "Top Rated TV Shows",
|
||||
"$tmdbAPI/movie/upcoming?api_key=$apiKey®ion=&page=" to "Upcoming Movies",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_original_language=ko&page=" to "Korean Shows",
|
||||
"$tmdbAPI/tv/airing_today?api_key=$apiKey&with_keywords=210024|222243&sort_by=primary_release_date.desc&without_keywords=195669&page=" to "Airing Today Anime",
|
||||
"$tmdbAPI/tv/on_the_air?api_key=$apiKey&with_keywords=210024|222243&sort_by=primary_release_date.desc&without_keywords=195669&page=" to "Ongoing Anime",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_keywords=210024|222243&without_keywords=195669&page=" to "Anime",
|
||||
"$tmdbAPI/discover/movie?api_key=$apiKey&with_keywords=210024|222243&without_keywords=195669&page=" to "Anime Movies",
|
||||
"$tmdbAPI/trending/all/day?api_key=$apiKey®ion=" to "Trending",
|
||||
"$tmdbAPI/movie/popular?api_key=$apiKey®ion=" to "Popular Movies",
|
||||
"$tmdbAPI/tv/popular?api_key=$apiKey®ion=" to "Popular TV Shows",
|
||||
// "$tmdbAPI/tv/airing_today?api_key=$apiKey®ion=" to "Airing Today TV Shows",
|
||||
"$tmdbAPI/tv/on_the_air?api_key=$apiKey®ion=" to "On The Air TV Shows",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_networks=213" to "Netflix",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_networks=1024" to "Amazon",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_networks=2739" to "Disney+",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_networks=453" to "Hulu",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_networks=2552" to "Apple TV+",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_networks=49" to "HBO",
|
||||
"$tmdbAPI/movie/top_rated?api_key=$apiKey®ion=" to "Top Rated Movies",
|
||||
"$tmdbAPI/tv/top_rated?api_key=$apiKey®ion=" to "Top Rated TV Shows",
|
||||
"$tmdbAPI/movie/upcoming?api_key=$apiKey®ion=" to "Upcoming Movies",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_original_language=ko" to "Korean Shows",
|
||||
"$tmdbAPI/tv/airing_today?api_key=$apiKey&with_keywords=210024|222243&sort_by=primary_release_date.desc" to "Airing Today Anime",
|
||||
"$tmdbAPI/tv/on_the_air?api_key=$apiKey&with_keywords=210024|222243&sort_by=primary_release_date.desc" to "Ongoing Anime",
|
||||
"$tmdbAPI/discover/tv?api_key=$apiKey&with_keywords=210024|222243" to "Anime",
|
||||
"$tmdbAPI/discover/movie?api_key=$apiKey&with_keywords=210024|222243" to "Anime Movies",
|
||||
)
|
||||
|
||||
private fun getImageUrl(link: String?): String? {
|
||||
|
@ -147,9 +147,9 @@ open class SoraStream : TmdbProvider() {
|
|||
page: Int,
|
||||
request: MainPageRequest
|
||||
): HomePageResponse {
|
||||
// checkMainServer()
|
||||
val adultQuery = if(settingsForProvider.enableAdult) "&page=" else "&without_keywords=190370|13059|226161|195669&page="
|
||||
val type = if (request.data.contains("/movie")) "movie" else "tv"
|
||||
val home = app.get(request.data + page)
|
||||
val home = app.get("${request.data}$adultQuery$page")
|
||||
.parsedSafe<Results>()?.results
|
||||
?.mapNotNull { media ->
|
||||
media.toSearchResponse(type)
|
||||
|
|
Loading…
Reference in a new issue