Fixing DopeBox and Sflix (#398)

This commit is contained in:
Quickdesh
2022-03-15 23:41:43 +09:00
committed by GitHub
parent cf7e14ec40
commit adce1d6a8e
4 changed files with 7 additions and 5 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'DopeBox'
pkgNameSuffix = 'en.dopebox'
extClass = '.DopeBox'
extVersionCode = 2
extVersionCode = 3
libVersion = '12'
}

View File

@ -70,7 +70,7 @@ class DopeBox : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
override fun episodeListParse(response: Response): List<SEpisode> {
val document = response.asJsoup()
val episodeList = mutableListOf<SEpisode>()
var episodeList = mutableListOf<SEpisode>()
val infoElement = document.select("div.detail_page-watch")
val id = infoElement.attr("data-id")
val dataType = infoElement.attr("data-type") // Tv = 2 or movie = 1
@ -85,8 +85,9 @@ class DopeBox : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
val seasonsElements = seasonsHtml.select("a.dropdown-item.ss-item")
seasonsElements.forEach {
val seasonEpList = parseEpisodesFromSeries(it)
episodeList.addAll(seasonEpList)
episodeList.addAll(seasonEpList)
}
episodeList = episodeList.reversed().toMutableList()
} else {
val movieUrl = "https://dopebox.to/ajax/movie/episodes/$id"
val episode = SEpisode.create()

View File

@ -5,7 +5,7 @@ ext {
extName = 'Sflix'
pkgNameSuffix = 'en.sflix'
extClass = '.SFlix'
extVersionCode = 2
extVersionCode = 3
libVersion = '12'
}

View File

@ -70,7 +70,7 @@ class SFlix : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
override fun episodeListParse(response: Response): List<SEpisode> {
val document = response.asJsoup()
val episodeList = mutableListOf<SEpisode>()
var episodeList = mutableListOf<SEpisode>()
val infoElement = document.select("div.detail_page-watch")
val id = infoElement.attr("data-id")
val dataType = infoElement.attr("data-type") // Tv = 2 or movie = 1
@ -87,6 +87,7 @@ class SFlix : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
val seasonEpList = parseEpisodesFromSeries(it)
episodeList.addAll(seasonEpList)
}
episodeList = episodeList.reversed().toMutableList()
} else {
val movieUrl = "https://sflix.to/ajax/movie/episodes/$id"
val episode = SEpisode.create()