Add video type info to filman provider (#27)

This commit is contained in:
Memexurer 2022-09-25 12:41:31 +02:00 committed by GitHub
parent 02b807aa6c
commit 95dddf7e34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -137,8 +137,13 @@ class FilmanProvider : MainAPI() {
document?.select(".link-to-video")?.apmap { item ->
val decoded = base64Decode(item.select("a").attr("data-iframe"))
val videoType = item.parent()?.select("td:nth-child(2)")?.text()
val link = tryParseJson<LinkElement>(decoded)?.src ?: return@apmap
loadExtractor(link, subtitleCallback, callback)
loadExtractor(link, subtitleCallback) { extractedLink ->
run {
callback(ExtractorLink(extractedLink.source, extractedLink.name + " " + videoType, extractedLink.url, extractedLink.referer, extractedLink.quality, extractedLink.isM3u8, extractedLink.headers, extractedLink.extractorData))
}
}
}
return true
}