uaserial: Added spilberg player
This commit is contained in:
parent
eef2c62dcc
commit
80ea80b6d0
2 changed files with 9 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 5
|
version = 6
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.google.code.gson:gson:2.9.0")
|
implementation("com.google.code.gson:gson:2.9.0")
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.lagradost
|
package com.lagradost
|
||||||
|
|
||||||
import android.util.Log
|
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addActors
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addActors
|
||||||
|
@ -34,7 +33,6 @@ open class UASerialProvider(url: String, name: String) : MainAPI() {
|
||||||
page: Int,
|
page: Int,
|
||||||
request: MainPageRequest
|
request: MainPageRequest
|
||||||
): HomePageResponse {
|
): HomePageResponse {
|
||||||
Log.d("CakesTwix-Debug", request.data)
|
|
||||||
val document = app.get(request.data.format(page)).document
|
val document = app.get(request.data.format(page)).document
|
||||||
|
|
||||||
val home = document.select(".row .col").map {
|
val home = document.select(".row .col").map {
|
||||||
|
@ -169,16 +167,22 @@ open class UASerialProvider(url: String, name: String) : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
val document = app.get(mainUrl + app.get(dataList[0]).document.select("option[data-series-number=${dataList[1]}]").attr("value")).document
|
val document = app.get(mainUrl + app.get(dataList[0]).document.select("option[data-series-number=${dataList[1]}]").attr("value")).document
|
||||||
document.select(".player .voices__wrap").map{ player ->
|
document.select(".voices__wrap").map{ player ->
|
||||||
// Log.d("load-debug", player.attr("data-player-id")) // Player name
|
// Log.d("load-debug", player.attr("data-player-id")) // Player name
|
||||||
player.select("select.voices__select option").map{ dub ->
|
player.select("select.voices__select option").map{ dub ->
|
||||||
// Log.d("load-debug", dub.text()) // Name
|
// Log.d("load-debug", dub.text()) // Name
|
||||||
// Log.d("load-debug", dub.attr("value"))// Url
|
// Log.d("load-debug", dub.attr("value"))// Url
|
||||||
|
|
||||||
val m3u8Url = app.get(dub.attr("value")).document.select("script").html()
|
var m3u8Url = app.get(dub.attr("value")).document.select("script").html()
|
||||||
.substringAfterLast("file:\"")
|
.substringAfterLast("file:\"")
|
||||||
.substringBefore("\",")
|
.substringBefore("\",")
|
||||||
|
|
||||||
|
if (player.attr("data-player-id") == "spilberg"){
|
||||||
|
m3u8Url = app.get(dub.attr("value")).document.select("script").html()
|
||||||
|
.substringAfterLast(" manifest: '")
|
||||||
|
.substringBefore("',")
|
||||||
|
}
|
||||||
|
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
source = "${dub.text()} (${player.attr("data-player-id").replaceFirstChar { it.uppercase() }})",
|
source = "${dub.text()} (${player.attr("data-player-id").replaceFirstChar { it.uppercase() }})",
|
||||||
streamUrl = m3u8Url,
|
streamUrl = m3u8Url,
|
||||||
|
|
Loading…
Reference in a new issue