fix @Blatzar and change type
This commit is contained in:
parent
71922eaa40
commit
6b9070b9be
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 1
|
||||
version = 2
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
@ -18,7 +18,7 @@ cloudstream {
|
|||
* */
|
||||
status = 1 // will be 3 if unspecified
|
||||
tvTypes = listOf(
|
||||
"TvSeries",
|
||||
"Others",
|
||||
)
|
||||
|
||||
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 bypassApiUrl = "https://skillshare-api.heckernohecking.repl.co"
|
||||
|
||||
override val supportedTypes = setOf(TvType.TvSeries)
|
||||
override val supportedTypes = setOf(TvType.Others)
|
||||
override val hasChromecastSupport = true
|
||||
override var lang = "en"
|
||||
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 document = app.get(bypassApiUrl + "/${data.courseId}/0")
|
||||
.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)
|
||||
}
|
||||
|
||||
return newTvSeriesLoadResponse(title, data.courseId, TvType.TvSeries, episodeList) {
|
||||
return newTvSeriesLoadResponse(title, data.courseId ?: return null, TvType.TvSeries, episodeList) {
|
||||
addPoster(poster)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue