Skip to content

Commit

Permalink
Oldserials Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
phisher98 committed Nov 18, 2024
1 parent 169381f commit 601c8cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Oldserials/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// use an integer for version numbers
version = 2
version = 3
cloudstream {
// All of these properties are optional, you can safely remove them

Expand Down
6 changes: 3 additions & 3 deletions Oldserials/src/main/kotlin/com/HindiProviders/Oldserials.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Oldserials : MainAPI() {
private fun Element.toRecommendResult(): SearchResponse? {
val title = this.selectFirst("a")?.attr("title") ?: return null
val href = fixUrl(this.selectFirst("a")?.attr("href") ?: return null)
val posterUrl = "https://oldserials.co/pub/assets/images/OldSerials-logo-v3.png"
val posterUrl = "https://oldserials.cc/pub/assets/images/OldSerials-logo-v3.png"
return newMovieSearchResponse(title, href, TvType.Movie) {
this.posterUrl = posterUrl
}
Expand All @@ -64,7 +64,7 @@ class Oldserials : MainAPI() {

private fun Suggestion.toSearchResponse(): SearchResponse {
return newTvSeriesSearchResponse(value,link,TvType.TvSeries) {
this.posterUrl = "https://oldserials.co/pub/assets/images/OldSerials-logo-v3.png"
this.posterUrl = "https://oldserials.cc/pub/assets/images/OldSerials-logo-v3.png"
}
}

Expand All @@ -77,7 +77,7 @@ class Oldserials : MainAPI() {
override suspend fun load(url: String): LoadResponse {
val document = app.get(url, timeout = 30L).document
val title = document.selectFirst("div.contentp h1")?.text() ?: "Unknown"
val posterUrl = document.selectFirst("div.cont-img figure img")?.attr("src") ?: "https://oldserials.co/pub/assets/images/OldSerials-logo-v3.png"
val posterUrl = document.selectFirst("div.cont-img figure img")?.attr("src") ?: "https://oldserials.cc/pub/assets/images/OldSerials-logo-v3.png"
val lastpage=document.select("#pagination_btns a:contains(Last)").attr("href").substringAfterLast("/").toIntOrNull() ?: 0
val plot = document.selectFirst("div.story-section")?.text() ?: ""
val recommendations = document.select("ul.serial-listing li").mapNotNull {
Expand Down

0 comments on commit 601c8cb

Please sign in to comment.