Skip to content

Commit

Permalink
fix(en/putlocker): Fix empty title and add 360p preference value (#3015)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samfun75 authored Mar 6, 2024
1 parent 40811bc commit 1d8de9d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/en/putlocker/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'PutLocker'
extClass = '.PutLocker'
extVersionCode = 4
extVersionCode = 5
}

apply from: "$rootDir/common.gradle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1d8de9d

Please sign in to comment.