Kavita: Bugfix/expected url scheme (#14322)
* pageListRequest now returns a correct url This method was apparently not called in previous versions but it does now in the preview version (r5254) when downloading thus failing because was returning a wrong url. * Changelog and bumped version
This commit is contained in:
parent
7b7b6b4486
commit
f2198c975e
|
@ -1,3 +1,9 @@
|
||||||
|
## 1.3.8
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
* Fixed `Expected URL scheme 'http' or 'https` when downloading
|
||||||
|
|
||||||
## 1.3.7
|
## 1.3.7
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
@ -6,6 +12,7 @@
|
||||||
* New Filter: Year release filter
|
* New Filter: Year release filter
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
||||||
* Filters can now be used together with search
|
* Filters can now be used together with search
|
||||||
* Epub and pdfs no longer show in format filter (currently not supported)
|
* Epub and pdfs no longer show in format filter (currently not supported)
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'Kavita'
|
extName = 'Kavita'
|
||||||
pkgNameSuffix = 'all.kavita'
|
pkgNameSuffix = 'all.kavita'
|
||||||
extClass = '.KavitaFactory'
|
extClass = '.KavitaFactory'
|
||||||
extVersionCode = 7
|
extVersionCode = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -491,9 +491,8 @@ class Kavita(private val suffix: String = "") : ConfigurableSource, UnmeteredSou
|
||||||
* Fetches the "url" of each page from the chapter
|
* Fetches the "url" of each page from the chapter
|
||||||
* **/
|
* **/
|
||||||
override fun pageListRequest(chapter: SChapter): Request {
|
override fun pageListRequest(chapter: SChapter): Request {
|
||||||
return GET("${chapter.url}/Reader/chapter-info")
|
return GET("$apiUrl/${chapter.url}", headersBuilder().build())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun fetchPageList(chapter: SChapter): Observable<List<Page>> {
|
override fun fetchPageList(chapter: SChapter): Observable<List<Page>> {
|
||||||
val chapterId = chapter.url
|
val chapterId = chapter.url
|
||||||
val numPages = chapter.scanlator?.replace(" pages", "")?.toInt()
|
val numPages = chapter.scanlator?.replace(" pages", "")?.toInt()
|
||||||
|
@ -850,7 +849,10 @@ class Kavita(private val suffix: String = "") : ConfigurableSource, UnmeteredSou
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun headersBuilder(): Headers.Builder {
|
override fun headersBuilder(): Headers.Builder {
|
||||||
if (jwtToken.isEmpty()) throw LoginErrorException("401 Error\nOPDS address got modified or is incorrect")
|
if (jwtToken.isEmpty()) {
|
||||||
|
doLogin()
|
||||||
|
if (jwtToken.isEmpty()) throw LoginErrorException("Error: jwt token is empty.\nTry opening the extension first")
|
||||||
|
}
|
||||||
return Headers.Builder()
|
return Headers.Builder()
|
||||||
.add("User-Agent", "Tachiyomi Kavita v${AppInfo.getVersionName()}")
|
.add("User-Agent", "Tachiyomi Kavita v${AppInfo.getVersionName()}")
|
||||||
.add("Content-Type", "application/json")
|
.add("Content-Type", "application/json")
|
||||||
|
|
Loading…
Reference in New Issue