mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
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 {
|
||||
// Filter API depending on preferred media type
|
||||
val listEnumAnime = listOf(TvType.Anime, TvType.AnimeMovie, TvType.OVA)
|
||||
val listEnumMovieTv = listOf(TvType.Movie, TvType.TvSeries, TvType.Cartoon)
|
||||
val mediaTypeList = if (currentPrefMedia == 1) listEnumMovieTv else listEnumAnime
|
||||
|
||||
val filteredAPI =
|
||||
allApis.filter { api -> api.supportedTypes.any { it in mediaTypeList } }
|
||||
filteredAPI
|
||||
val listEnumMovieTv = listOf(TvType.Movie, TvType.TvSeries, TvType.Cartoon, TvType.AsianDrama)
|
||||
val listEnumDoc = listOf(TvType.Documentary)
|
||||
val mediaTypeList = when (currentPrefMedia) {
|
||||
2 -> listEnumAnime
|
||||
3 -> listEnumDoc
|
||||
else -> listEnumMovieTv
|
||||
}
|
||||
allApis.filter { api -> api.supportedTypes.any { it in mediaTypeList } }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.lagradost.cloudstream3.movieproviders
|
||||
|
||||
import com.fasterxml.jackson.module.kotlin.readValue
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.extractors.FEmbed
|
||||
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.loadExtractor
|
||||
|
||||
|
@ -53,21 +53,22 @@ class PinoyMoviePediaProvider : MainAPI() {
|
|||
name = urlTitle.select("h3")?.text() ?: ""
|
||||
year = titleYear?.select("span")?.text()?.takeLast(4)?.toIntOrNull()
|
||||
}
|
||||
// Get year from name
|
||||
if (year == null) {
|
||||
// Get year from name
|
||||
val rex = Regex("\\((\\d+)")
|
||||
year = rex.find(name)?.value?.replace("(", "")?.toIntOrNull()
|
||||
}
|
||||
//Get quality
|
||||
val qual = getQualityFromString(it.selectFirst("span.quality")?.text())
|
||||
|
||||
val tvType = TvType.Movie
|
||||
MovieSearchResponse(
|
||||
name,
|
||||
link,
|
||||
this.name,
|
||||
tvType,
|
||||
image,
|
||||
year,
|
||||
null,
|
||||
name = name,
|
||||
url = link,
|
||||
apiName = this.name,
|
||||
TvType.Movie,
|
||||
posterUrl = image,
|
||||
year = year,
|
||||
quality = qual
|
||||
)
|
||||
}?.distinctBy { c -> c.url } ?: listOf()
|
||||
// Add
|
||||
|
@ -93,14 +94,16 @@ class PinoyMoviePediaProvider : MainAPI() {
|
|||
val title = details.select("div.title")?.text() ?: ""
|
||||
val year = details.select("div.meta > span.year")?.text()?.toIntOrNull()
|
||||
val image = inner.select("div.image > div > a > img")?.attr("src")
|
||||
val qual = getQualityFromString(it.selectFirst("span.quality")?.text())
|
||||
|
||||
MovieSearchResponse(
|
||||
title,
|
||||
link,
|
||||
this.name,
|
||||
name = title,
|
||||
url = link,
|
||||
apiName = this.name,
|
||||
TvType.Movie,
|
||||
image,
|
||||
year
|
||||
posterUrl = image,
|
||||
year = year,
|
||||
quality = qual
|
||||
)
|
||||
}?.distinctBy { c -> c.url } ?: listOf()
|
||||
}
|
||||
|
@ -149,7 +152,7 @@ class PinoyMoviePediaProvider : MainAPI() {
|
|||
playcontainer?.select("iframe")?.forEach { item ->
|
||||
val lnk = item?.attr("src")?.trim() ?: ""
|
||||
//Log.i(this.name, "Result => (lnk) $lnk")
|
||||
if (lnk.isNotBlank()) {
|
||||
if (lnk.isNotEmpty()) {
|
||||
listOfLinks.add(lnk)
|
||||
}
|
||||
}
|
||||
|
@ -219,7 +222,7 @@ class PinoyMoviePediaProvider : MainAPI() {
|
|||
): Boolean {
|
||||
// parse movie servers
|
||||
var count = 0
|
||||
mapper.readValue<List<String>>(data).apmap { link ->
|
||||
tryParseJson<List<String>>(data)?.apmap { link ->
|
||||
count++
|
||||
if (link.contains("fembed.com")) {
|
||||
val extractor = FEmbed()
|
||||
|
|
|
@ -105,8 +105,8 @@
|
|||
<string name="subs_window_color">Colore finestra</string>
|
||||
<string name="subs_edge_type">Tipo bordo</string>
|
||||
<string name="subs_subtitle_elevation">Elevazione sottotitolo</string>
|
||||
<string name="subs_font">Font</string>
|
||||
<string name="subs_font_size">Dimensione font</string>
|
||||
<string name="subs_font">Carattere</string>
|
||||
<string name="subs_font_size">Dimensione</string>
|
||||
|
||||
<string name="search_provider_text_providers">Cerca per provider</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="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_vlc">Riproduci in VLC</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_auto_download">Download automatico</string>
|
||||
<string name="episode_action_download_mirror">Download Mirror</string>
|
||||
<string name="episode_action_auto_download">Download</string>
|
||||
<string name="episode_action_download_mirror">Download mirror</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="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_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="dns_pref">DNS over HTTPS</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>
|
||||
|
||||
|
@ -316,6 +317,13 @@
|
|||
<string name="add_sync">Aggiungi tracking</string>
|
||||
<string name="added_sync_format" formatted="true">Aggiunto %s</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="normal">Normale</string>
|
||||
|
@ -324,9 +332,9 @@
|
|||
<string name="min">Min</string>
|
||||
<string name="subtitles_none" translatable="false">@string/none</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_raised">Sollevato</string>
|
||||
<string name="subtitles_raised">Rilievo</string>
|
||||
<string name="subtitle_offset">Sincronizza sottotitoli</string>
|
||||
<string name="subtitle_offset_hint">1000ms</string>
|
||||
<string name="subtitle_offset_title">Ritardo sottotitoli</string>
|
||||
|
@ -352,6 +360,7 @@
|
|||
<string name="home_source">Sorgente</string>
|
||||
|
||||
<string name="coming_soon">In Arrivo</string>
|
||||
|
||||
<string name="quality_cam">Cam</string>
|
||||
<string name="quality_cam_rip">Cam</string>
|
||||
<string name="quality_cam_hd">Cam</string>
|
||||
|
@ -362,5 +371,12 @@
|
|||
<string name="quality_blueray">BlueRay</string>
|
||||
<string name="quality_workprint">WP</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>
|
||||
</resources>
|
||||
|
|
|
@ -50,11 +50,13 @@
|
|||
<item>All</item>
|
||||
<item>Movies and TV</item>
|
||||
<item>Anime</item>
|
||||
<item>Documentary</item>
|
||||
</array>
|
||||
<array name="media_type_pref_values">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
</array>
|
||||
|
||||
<array name="video_buffer_length_names">
|
||||
|
|
Loading…
Reference in a new issue