From 1d8de9db586420a3c774b8803ef01d9a8c28ecae Mon Sep 17 00:00:00 2001 From: Samfun75 <38332931+Samfun75@users.noreply.github.com> Date: Thu, 7 Mar 2024 01:51:00 +0300 Subject: [PATCH] fix(en/putlocker): Fix empty title and add 360p preference value (#3015) --- src/en/putlocker/build.gradle | 2 +- .../tachiyomi/animeextension/en/putlocker/PutLocker.kt | 6 +++--- .../en/putlocker/extractors/PutServerExtractor.kt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/en/putlocker/build.gradle b/src/en/putlocker/build.gradle index 5624f386b2..23bed7375d 100644 --- a/src/en/putlocker/build.gradle +++ b/src/en/putlocker/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'PutLocker' extClass = '.PutLocker' - extVersionCode = 4 + extVersionCode = 5 } apply from: "$rootDir/common.gradle" diff --git a/src/en/putlocker/src/eu/kanade/tachiyomi/animeextension/en/putlocker/PutLocker.kt b/src/en/putlocker/src/eu/kanade/tachiyomi/animeextension/en/putlocker/PutLocker.kt index 93a873a2a1..aa3558956b 100644 --- a/src/en/putlocker/src/eu/kanade/tachiyomi/animeextension/en/putlocker/PutLocker.kt +++ b/src/en/putlocker/src/eu/kanade/tachiyomi/animeextension/en/putlocker/PutLocker.kt @@ -74,7 +74,7 @@ class PutLocker : ConfigurableAnimeSource, ParsedAnimeHttpSource() { override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/filter/$page?genre=all&country=all&types=all&year=all&sort=updated") - override fun latestUpdatesSelector(): String = "div.movies-list > div.ml-item > div.mli-poster" + override fun latestUpdatesSelector(): String = "div.movies-list > div.ml-item" override fun latestUpdatesNextPageSelector(): String = "div#pagination li.active ~ li" @@ -257,8 +257,8 @@ class PutLocker : ConfigurableAnimeSource, ParsedAnimeHttpSource() { val videoQualityPref = ListPreference(screen.context).apply { key = "preferred_quality" title = "Preferred quality" - entries = arrayOf("1080p", "720p", "480p") - entryValues = arrayOf("1080", "720", "480") + entries = arrayOf("1080p", "720p", "480p", "360p") + entryValues = arrayOf("1080", "720", "480", "360") setDefaultValue("1080") summary = "%s" diff --git a/src/en/putlocker/src/eu/kanade/tachiyomi/animeextension/en/putlocker/extractors/PutServerExtractor.kt b/src/en/putlocker/src/eu/kanade/tachiyomi/animeextension/en/putlocker/extractors/PutServerExtractor.kt index 1bda211946..8ab0e3d988 100644 --- a/src/en/putlocker/src/eu/kanade/tachiyomi/animeextension/en/putlocker/extractors/PutServerExtractor.kt +++ b/src/en/putlocker/src/eu/kanade/tachiyomi/animeextension/en/putlocker/extractors/PutServerExtractor.kt @@ -80,7 +80,7 @@ class PutServerExtractor(private val client: OkHttpClient) { val playerResp = client.newCall(GET(embedUrl, referer)).execute().asJsoup() val player = playerResp.select("div#player") - val vidId = "\"" + player.attr("data-id") + "\"" + val vidId = "\"${player.attr("data-id")}\"" val vidHash = player.attr("data-hash") val cipher = CryptoAES.encrypt(vidHash, vidId) val vidUrl = "$embedHost/ajax/getSources/".toHttpUrl().newBuilder()