Skip to content

Commit

Permalink
fix(en/Wcofun): fix items is missing on episodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dark25 committed Nov 18, 2024
1 parent fc40ddf commit 8c68343
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/en/wcofun/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'Wcofun'
extClass = '.Wcofun'
extVersionCode = 13
extVersionCode = 14
}

apply from: "$rootDir/common.gradle"
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ class Wcofun : ConfigurableAnimeSource, ParsedAnimeHttpSource() {

override fun episodeFromElement(element: Element) = SEpisode.create().apply {
setUrlWithoutDomain(element.attr("href"))
val epName = element.ownText()
val season = epName.substringAfter("Season ")
val ep = epName.substringAfter("Episode ")
val seasonNum = season.substringBefore(" ").toIntOrNull() ?: 1
val epNum = ep.substringBefore(" ").toIntOrNull() ?: 1
episode_number = (seasonNum * 100 + epNum).toFloat()
name = "Season $seasonNum - Episode $epNum"
val title = element.attr("title")
val season = title.substringAfter("Season ").substringBefore(" ")
val episode = title.substringAfter("Episode ").substringBefore(" ")
val seasonNum = season.toIntOrNull() ?: 1
val episodeNum = episode.toIntOrNull() ?: 1
episode_number = ((seasonNum - 1) * 100 + episodeNum).toFloat()
name = "Season $seasonNum - Episode $episodeNum"
}

// ============================ Video Links =============================
Expand Down

0 comments on commit 8c68343

Please sign in to comment.