Nicovideo Seiga: Fix image intercept (#5469)

Fix images not decrypting
This commit is contained in:
ringosham 2024-10-11 12:28:42 +01:00 committed by Draff
parent a1efe96b9d
commit 23e2192290
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Nicovideo Seiga'
extClass = '.NicovideoSeiga'
extVersionCode = 5
extVersionCode = 6
}
apply from: "$rootDir/common.gradle"

View File

@ -220,7 +220,7 @@ class NicovideoSeiga : HttpSource() {
// drm.cdn.nicomanga.jp -> Paid manga (Encrypted)
// deliver.cdn.nicomanga.jp -> Free manga (Unencrypted)
val imageRegex =
Regex("https://drm.cdn.nicomanga.jp/image/([a-f0-9]+)_\\d{4}/\\d+p(\\.[a-z]+)?(\\?\\d+)?")
Regex("https://drm.cdn.nicomanga.jp/image/([a-f0-9]+)_\\d+/\\d+p(\\.[a-z]+)?(\\?\\d+)?")
val match = imageRegex.find(chain.request().url.toUrl().toString())
?: return chain.proceed(chain.request())