Fix pages with site static resources on readmanga/mintmanga (#487)

Fix pages with site static resources on readmanga/mintmanga
This commit is contained in:
Taumer 2018-09-10 14:05:26 +03:00 committed by Carlos
parent dfbd58920a
commit b19c3b30c8
4 changed files with 16 additions and 6 deletions

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: Mintmanga'
pkgNameSuffix = 'ru.mintmanga'
extClass = '.Mintmanga'
extVersionCode = 6
extVersionSuffix = 6
extVersionCode = 7
extVersionSuffix = 7
libVersion = '1.2'
}

View File

@ -151,7 +151,12 @@ class Mintmanga : ParsedHttpSource() {
var i = 0
while (m.find()) {
val urlParts = m.group().replace("[\"\']+".toRegex(), "").split(',')
pages.add(Page(i++, "", urlParts[1] + urlParts[0] + urlParts[2]))
val url = if (urlParts[1].isEmpty() && urlParts[2].startsWith("/static/")) {
baseUrl + urlParts[2]
} else {
urlParts[1] + urlParts[0] + urlParts[2]
}
pages.add(Page(i++, "", url))
}
return pages
}

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: Readmanga'
pkgNameSuffix = 'ru.readmanga'
extClass = '.Readmanga'
extVersionCode = 6
extVersionSuffix = 6
extVersionCode = 7
extVersionSuffix = 7
libVersion = '1.2'
}

View File

@ -151,7 +151,12 @@ class Readmanga : ParsedHttpSource() {
var i = 0
while (m.find()) {
val urlParts = m.group().replace("[\"\']+".toRegex(), "").split(',')
pages.add(Page(i++, "", urlParts[1] + urlParts[0] + urlParts[2]))
val url = if (urlParts[1].isEmpty() && urlParts[2].startsWith("/static/")) {
baseUrl + urlParts[2]
} else {
urlParts[1] + urlParts[0] + urlParts[2]
}
pages.add(Page(i++, "", url))
}
return pages
}