forked from recloudstream/cloudstream
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
868e91a48c
4 changed files with 55 additions and 32 deletions
|
@ -268,12 +268,14 @@ object APIHolder {
|
||||||
} else {
|
} else {
|
||||||
// Filter API depending on preferred media type
|
// Filter API depending on preferred media type
|
||||||
val listEnumAnime = listOf(TvType.Anime, TvType.AnimeMovie, TvType.OVA)
|
val listEnumAnime = listOf(TvType.Anime, TvType.AnimeMovie, TvType.OVA)
|
||||||
val listEnumMovieTv = listOf(TvType.Movie, TvType.TvSeries, TvType.Cartoon)
|
val listEnumMovieTv = listOf(TvType.Movie, TvType.TvSeries, TvType.Cartoon, TvType.AsianDrama)
|
||||||
val mediaTypeList = if (currentPrefMedia == 1) listEnumMovieTv else listEnumAnime
|
val listEnumDoc = listOf(TvType.Documentary)
|
||||||
|
val mediaTypeList = when (currentPrefMedia) {
|
||||||
val filteredAPI =
|
2 -> listEnumAnime
|
||||||
allApis.filter { api -> api.supportedTypes.any { it in mediaTypeList } }
|
3 -> listEnumDoc
|
||||||
filteredAPI
|
else -> listEnumMovieTv
|
||||||
|
}
|
||||||
|
allApis.filter { api -> api.supportedTypes.any { it in mediaTypeList } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package com.lagradost.cloudstream3.movieproviders
|
package com.lagradost.cloudstream3.movieproviders
|
||||||
|
|
||||||
import com.fasterxml.jackson.module.kotlin.readValue
|
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.extractors.FEmbed
|
import com.lagradost.cloudstream3.extractors.FEmbed
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.toJson
|
import com.lagradost.cloudstream3.utils.AppUtils.toJson
|
||||||
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||||
|
|
||||||
|
@ -53,21 +53,22 @@ class PinoyMoviePediaProvider : MainAPI() {
|
||||||
name = urlTitle.select("h3")?.text() ?: ""
|
name = urlTitle.select("h3")?.text() ?: ""
|
||||||
year = titleYear?.select("span")?.text()?.takeLast(4)?.toIntOrNull()
|
year = titleYear?.select("span")?.text()?.takeLast(4)?.toIntOrNull()
|
||||||
}
|
}
|
||||||
|
// Get year from name
|
||||||
if (year == null) {
|
if (year == null) {
|
||||||
// Get year from name
|
|
||||||
val rex = Regex("\\((\\d+)")
|
val rex = Regex("\\((\\d+)")
|
||||||
year = rex.find(name)?.value?.replace("(", "")?.toIntOrNull()
|
year = rex.find(name)?.value?.replace("(", "")?.toIntOrNull()
|
||||||
}
|
}
|
||||||
|
//Get quality
|
||||||
|
val qual = getQualityFromString(it.selectFirst("span.quality")?.text())
|
||||||
|
|
||||||
val tvType = TvType.Movie
|
|
||||||
MovieSearchResponse(
|
MovieSearchResponse(
|
||||||
name,
|
name = name,
|
||||||
link,
|
url = link,
|
||||||
this.name,
|
apiName = this.name,
|
||||||
tvType,
|
TvType.Movie,
|
||||||
image,
|
posterUrl = image,
|
||||||
year,
|
year = year,
|
||||||
null,
|
quality = qual
|
||||||
)
|
)
|
||||||
}?.distinctBy { c -> c.url } ?: listOf()
|
}?.distinctBy { c -> c.url } ?: listOf()
|
||||||
// Add
|
// Add
|
||||||
|
@ -93,14 +94,16 @@ class PinoyMoviePediaProvider : MainAPI() {
|
||||||
val title = details.select("div.title")?.text() ?: ""
|
val title = details.select("div.title")?.text() ?: ""
|
||||||
val year = details.select("div.meta > span.year")?.text()?.toIntOrNull()
|
val year = details.select("div.meta > span.year")?.text()?.toIntOrNull()
|
||||||
val image = inner.select("div.image > div > a > img")?.attr("src")
|
val image = inner.select("div.image > div > a > img")?.attr("src")
|
||||||
|
val qual = getQualityFromString(it.selectFirst("span.quality")?.text())
|
||||||
|
|
||||||
MovieSearchResponse(
|
MovieSearchResponse(
|
||||||
title,
|
name = title,
|
||||||
link,
|
url = link,
|
||||||
this.name,
|
apiName = this.name,
|
||||||
TvType.Movie,
|
TvType.Movie,
|
||||||
image,
|
posterUrl = image,
|
||||||
year
|
year = year,
|
||||||
|
quality = qual
|
||||||
)
|
)
|
||||||
}?.distinctBy { c -> c.url } ?: listOf()
|
}?.distinctBy { c -> c.url } ?: listOf()
|
||||||
}
|
}
|
||||||
|
@ -149,7 +152,7 @@ class PinoyMoviePediaProvider : MainAPI() {
|
||||||
playcontainer?.select("iframe")?.forEach { item ->
|
playcontainer?.select("iframe")?.forEach { item ->
|
||||||
val lnk = item?.attr("src")?.trim() ?: ""
|
val lnk = item?.attr("src")?.trim() ?: ""
|
||||||
//Log.i(this.name, "Result => (lnk) $lnk")
|
//Log.i(this.name, "Result => (lnk) $lnk")
|
||||||
if (lnk.isNotBlank()) {
|
if (lnk.isNotEmpty()) {
|
||||||
listOfLinks.add(lnk)
|
listOfLinks.add(lnk)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -219,7 +222,7 @@ class PinoyMoviePediaProvider : MainAPI() {
|
||||||
): Boolean {
|
): Boolean {
|
||||||
// parse movie servers
|
// parse movie servers
|
||||||
var count = 0
|
var count = 0
|
||||||
mapper.readValue<List<String>>(data).apmap { link ->
|
tryParseJson<List<String>>(data)?.apmap { link ->
|
||||||
count++
|
count++
|
||||||
if (link.contains("fembed.com")) {
|
if (link.contains("fembed.com")) {
|
||||||
val extractor = FEmbed()
|
val extractor = FEmbed()
|
||||||
|
|
|
@ -105,8 +105,8 @@
|
||||||
<string name="subs_window_color">Colore finestra</string>
|
<string name="subs_window_color">Colore finestra</string>
|
||||||
<string name="subs_edge_type">Tipo bordo</string>
|
<string name="subs_edge_type">Tipo bordo</string>
|
||||||
<string name="subs_subtitle_elevation">Elevazione sottotitolo</string>
|
<string name="subs_subtitle_elevation">Elevazione sottotitolo</string>
|
||||||
<string name="subs_font">Font</string>
|
<string name="subs_font">Carattere</string>
|
||||||
<string name="subs_font_size">Dimensione font</string>
|
<string name="subs_font_size">Dimensione</string>
|
||||||
|
|
||||||
<string name="search_provider_text_providers">Cerca per provider</string>
|
<string name="search_provider_text_providers">Cerca per provider</string>
|
||||||
<string name="search_provider_text_types">Cerca per tipo</string>
|
<string name="search_provider_text_types">Cerca per tipo</string>
|
||||||
|
@ -254,14 +254,15 @@
|
||||||
<string name="storage_error">Errore download, controlla i permessi di archiviazione</string>
|
<string name="storage_error">Errore download, controlla i permessi di archiviazione</string>
|
||||||
|
|
||||||
<string name="episode_action_chromecast_episode">Chromecast</string>
|
<string name="episode_action_chromecast_episode">Chromecast</string>
|
||||||
<string name="episode_action_chromecast_mirror">Mirror Chromecast</string>
|
<string name="episode_action_chromecast_mirror">Chromecast mirror</string>
|
||||||
<string name="episode_action_play_in_app">Riproduci in app</string>
|
<string name="episode_action_play_in_app">Riproduci in app</string>
|
||||||
<string name="episode_action_play_in_vlc">Riproduci in VLC</string>
|
<string name="episode_action_play_in_vlc">Riproduci in VLC</string>
|
||||||
<string name="episode_action_play_in_browser">Riproduci nel browser</string>
|
<string name="episode_action_play_in_browser">Riproduci nel browser</string>
|
||||||
<string name="episode_action_copy_link">Copia link</string>
|
<string name="episode_action_copy_link">Copia link</string>
|
||||||
<string name="episode_action_auto_download">Download automatico</string>
|
<string name="episode_action_auto_download">Download</string>
|
||||||
<string name="episode_action_download_mirror">Download Mirror</string>
|
<string name="episode_action_download_mirror">Download mirror</string>
|
||||||
<string name="episode_action_reload_links">Aggiorna link</string>
|
<string name="episode_action_reload_links">Aggiorna link</string>
|
||||||
|
<string name="episode_action_download_subtitle">Download sottotitoli</string>
|
||||||
|
|
||||||
<string name="no_update_found">Nessun aggiornamento trovato</string>
|
<string name="no_update_found">Nessun aggiornamento trovato</string>
|
||||||
<string name="check_for_update">Controlla aggiornamenti</string>
|
<string name="check_for_update">Controlla aggiornamenti</string>
|
||||||
|
@ -279,13 +280,13 @@
|
||||||
<string name="video_buffer_disk_settings">Dimensione cache video su disco</string>
|
<string name="video_buffer_disk_settings">Dimensione cache video su disco</string>
|
||||||
<string name="video_buffer_clear_settings">Cancella cache immagini e video</string>
|
<string name="video_buffer_clear_settings">Cancella cache immagini e video</string>
|
||||||
|
|
||||||
<string name="video_ram_description">Se impostato troppo alto può causare problemi su sistemi con poca RAM. Come dispositivi Android TV o vecchi telefoni</string>
|
<string name="video_ram_description">Se impostato troppo alto può causare problemi su sistemi con poca RAM. Come i dispositivi Android TV o vecchi telefoni</string>
|
||||||
<string name="video_disk_description">Se impostato troppo alto può causare problemi su sistemi con poca Archiviazione interna. Come i dispositivi Android TV</string>
|
<string name="video_disk_description">Se impostato troppo alto può causare problemi su sistemi con poca Archiviazione interna. Come i dispositivi Android TV</string>
|
||||||
|
|
||||||
<string name="dns_pref">DNS over HTTPS</string>
|
<string name="dns_pref">DNS over HTTPS</string>
|
||||||
<string name="dns_pref_summary">Utile per bypassare i blocchi ISP</string>
|
<string name="dns_pref_summary">Utile per bypassare i blocchi ISP</string>
|
||||||
|
|
||||||
<string name="download_path_pref">Download path</string>
|
<string name="download_path_pref">Posizione Download</string>
|
||||||
|
|
||||||
<string name="display_subbed_dubbed_settings">Mostra anime doppiati/sottotitolati</string>
|
<string name="display_subbed_dubbed_settings">Mostra anime doppiati/sottotitolati</string>
|
||||||
|
|
||||||
|
@ -316,6 +317,13 @@
|
||||||
<string name="add_sync">Aggiungi tracking</string>
|
<string name="add_sync">Aggiungi tracking</string>
|
||||||
<string name="added_sync_format" formatted="true">Aggiunto %s</string>
|
<string name="added_sync_format" formatted="true">Aggiunto %s</string>
|
||||||
<string name="upload_sync">Sync</string>
|
<string name="upload_sync">Sync</string>
|
||||||
|
<string name="sync_score">Valutato</string>
|
||||||
|
<string name="sync_score_format" formatted="true">%d / 10</string>
|
||||||
|
<string name="sync_total_episodes_none">/??</string>
|
||||||
|
<string name="sync_total_episodes_some" formatted="true">/%d</string>
|
||||||
|
<string name="authenticated_user" formatted="true">%s autenticato</string>
|
||||||
|
<string name="authenticated_user_fail" formatted="true">Impossibile autenticarsi a %s</string>
|
||||||
|
|
||||||
<!-- ============ -->
|
<!-- ============ -->
|
||||||
<string name="none">Nessuno</string>
|
<string name="none">Nessuno</string>
|
||||||
<string name="normal">Normale</string>
|
<string name="normal">Normale</string>
|
||||||
|
@ -324,9 +332,9 @@
|
||||||
<string name="min">Min</string>
|
<string name="min">Min</string>
|
||||||
<string name="subtitles_none" translatable="false">@string/none</string>
|
<string name="subtitles_none" translatable="false">@string/none</string>
|
||||||
<string name="subtitles_outline">Contorno</string>
|
<string name="subtitles_outline">Contorno</string>
|
||||||
<string name="subtitles_depressed">Depresso</string>
|
<string name="subtitles_depressed">Bassorilievo</string>
|
||||||
<string name="subtitles_shadow">Ombra</string>
|
<string name="subtitles_shadow">Ombra</string>
|
||||||
<string name="subtitles_raised">Sollevato</string>
|
<string name="subtitles_raised">Rilievo</string>
|
||||||
<string name="subtitle_offset">Sincronizza sottotitoli</string>
|
<string name="subtitle_offset">Sincronizza sottotitoli</string>
|
||||||
<string name="subtitle_offset_hint">1000ms</string>
|
<string name="subtitle_offset_hint">1000ms</string>
|
||||||
<string name="subtitle_offset_title">Ritardo sottotitoli</string>
|
<string name="subtitle_offset_title">Ritardo sottotitoli</string>
|
||||||
|
@ -352,6 +360,7 @@
|
||||||
<string name="home_source">Sorgente</string>
|
<string name="home_source">Sorgente</string>
|
||||||
|
|
||||||
<string name="coming_soon">In Arrivo</string>
|
<string name="coming_soon">In Arrivo</string>
|
||||||
|
|
||||||
<string name="quality_cam">Cam</string>
|
<string name="quality_cam">Cam</string>
|
||||||
<string name="quality_cam_rip">Cam</string>
|
<string name="quality_cam_rip">Cam</string>
|
||||||
<string name="quality_cam_hd">Cam</string>
|
<string name="quality_cam_hd">Cam</string>
|
||||||
|
@ -362,5 +371,12 @@
|
||||||
<string name="quality_blueray">BlueRay</string>
|
<string name="quality_blueray">BlueRay</string>
|
||||||
<string name="quality_workprint">WP</string>
|
<string name="quality_workprint">WP</string>
|
||||||
<string name="quality_dvd">DVD</string>
|
<string name="quality_dvd">DVD</string>
|
||||||
|
<string name="quality_4k">4K</string>
|
||||||
|
<string name="quality_sd">SD</string>
|
||||||
|
<string name="quality_uhd">UHD</string>
|
||||||
|
<string name="quality_hdr">HDR</string>
|
||||||
|
<string name="quality_sdr">SDR</string>
|
||||||
|
<string name="quality_webrip">Web</string>
|
||||||
|
|
||||||
<string name="poster_image">Poster</string>
|
<string name="poster_image">Poster</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -50,11 +50,13 @@
|
||||||
<item>All</item>
|
<item>All</item>
|
||||||
<item>Movies and TV</item>
|
<item>Movies and TV</item>
|
||||||
<item>Anime</item>
|
<item>Anime</item>
|
||||||
|
<item>Documentary</item>
|
||||||
</array>
|
</array>
|
||||||
<array name="media_type_pref_values">
|
<array name="media_type_pref_values">
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
<item>1</item>
|
<item>1</item>
|
||||||
<item>2</item>
|
<item>2</item>
|
||||||
|
<item>3</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="video_buffer_length_names">
|
<array name="video_buffer_length_names">
|
||||||
|
|
Loading…
Reference in a new issue