MangaPlus: Add UUID header (fixes #833)
This commit is contained in:
parent
27419ab711
commit
15932ee21d
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: Manga Plus by Shueisha'
|
appName = 'Tachiyomi: Manga Plus by Shueisha'
|
||||||
pkgNameSuffix = 'en.mangaplus'
|
pkgNameSuffix = 'en.mangaplus'
|
||||||
extClass = '.MangaPlus'
|
extClass = '.MangaPlus'
|
||||||
extVersionCode = 1
|
extVersionCode = 2
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import eu.kanade.tachiyomi.source.online.HttpSource
|
||||||
import okhttp3.*
|
import okhttp3.*
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import java.lang.Exception
|
import java.lang.Exception
|
||||||
|
import java.util.UUID.randomUUID
|
||||||
|
|
||||||
class MangaPlus : HttpSource() {
|
class MangaPlus : HttpSource() {
|
||||||
override val name = "Manga Plus by Shueisha"
|
override val name = "Manga Plus by Shueisha"
|
||||||
|
@ -25,7 +26,7 @@ class MangaPlus : HttpSource() {
|
||||||
add("Origin", WEB_URL)
|
add("Origin", WEB_URL)
|
||||||
add("Referer", WEB_URL)
|
add("Referer", WEB_URL)
|
||||||
add("User-Agent", USER_AGENT)
|
add("User-Agent", USER_AGENT)
|
||||||
add("X-Requested-With", "XMLHttpRequest")
|
add("SESSION-TOKEN", randomUUID().toString())
|
||||||
}.build()
|
}.build()
|
||||||
|
|
||||||
override val client = network.client.newBuilder().addInterceptor {
|
override val client = network.client.newBuilder().addInterceptor {
|
||||||
|
|
Loading…
Reference in New Issue