fix @Blatzar and change type
This commit is contained in:
parent
71922eaa40
commit
6b9070b9be
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 1
|
version = 2
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
@ -18,7 +18,7 @@ cloudstream {
|
||||||
* */
|
* */
|
||||||
status = 1 // will be 3 if unspecified
|
status = 1 // will be 3 if unspecified
|
||||||
tvTypes = listOf(
|
tvTypes = listOf(
|
||||||
"TvSeries",
|
"Others",
|
||||||
)
|
)
|
||||||
|
|
||||||
iconUrl = "https://www.google.com/s2/favicons?domain=skillshare.com&sz=%size%"
|
iconUrl = "https://www.google.com/s2/favicons?domain=skillshare.com&sz=%size%"
|
||||||
|
|
|
@ -20,7 +20,7 @@ class SkillShareProvider : MainAPI() { // all providers must be an instance of M
|
||||||
private val apiUrl = "https://www.skillshare.com/api/graphql"
|
private val apiUrl = "https://www.skillshare.com/api/graphql"
|
||||||
private val bypassApiUrl = "https://skillshare-api.heckernohecking.repl.co"
|
private val bypassApiUrl = "https://skillshare-api.heckernohecking.repl.co"
|
||||||
|
|
||||||
override val supportedTypes = setOf(TvType.TvSeries)
|
override val supportedTypes = setOf(TvType.Others)
|
||||||
override val hasChromecastSupport = true
|
override val hasChromecastSupport = true
|
||||||
override var lang = "en"
|
override var lang = "en"
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
|
@ -141,7 +141,7 @@ class SkillShareProvider : MainAPI() { // all providers must be an instance of M
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override suspend fun load(url: String): LoadResponse {
|
override suspend fun load(url: String): LoadResponse? {
|
||||||
val data = parseJson<Data>(url)
|
val data = parseJson<Data>(url)
|
||||||
val document = app.get(bypassApiUrl + "/${data.courseId}/0")
|
val document = app.get(bypassApiUrl + "/${data.courseId}/0")
|
||||||
.parsedSafe<BypassApiData>() ?: throw ErrorLoadingException("Invalid Json Response")
|
.parsedSafe<BypassApiData>() ?: throw ErrorLoadingException("Invalid Json Response")
|
||||||
|
@ -151,7 +151,7 @@ class SkillShareProvider : MainAPI() { // all providers must be an instance of M
|
||||||
Episode(episode.url ?: "", episode.title, 1, index)
|
Episode(episode.url ?: "", episode.title, 1, index)
|
||||||
}
|
}
|
||||||
|
|
||||||
return newTvSeriesLoadResponse(title, data.courseId, TvType.TvSeries, episodeList) {
|
return newTvSeriesLoadResponse(title, data.courseId ?: return null, TvType.TvSeries, episodeList) {
|
||||||
addPoster(poster)
|
addPoster(poster)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue