fix user-agent (#7865)

This commit is contained in:
Gauthier 2021-06-25 20:45:53 +08:00 committed by GitHub
parent 144d9d0d06
commit 5876f259c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,11 @@
## 1.2.28
Minimum Komga version required: `0.97.0`
### Fix
* incorrect User Agent
## 1.2.27
Minimum Komga version required: `0.97.0`

View File

@ -5,7 +5,7 @@ ext {
extName = 'Komga'
pkgNameSuffix = 'all.komga'
extClass = '.KomgaFactory'
extVersionCode = 27
extVersionCode = 28
libVersion = '1.2'
}

View File

@ -7,7 +7,7 @@ import android.util.Log
import android.widget.Toast
import com.github.salomonbrys.kotson.fromJson
import com.google.gson.Gson
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.extension.BuildConfig
import eu.kanade.tachiyomi.extension.all.komga.dto.AuthorDto
import eu.kanade.tachiyomi.extension.all.komga.dto.BookDto
import eu.kanade.tachiyomi.extension.all.komga.dto.CollectionDto
@ -359,7 +359,7 @@ open class Komga(suffix: String = "") : ConfigurableSource, HttpSource() {
override fun headersBuilder(): Headers.Builder =
Headers.Builder()
.add("User-Agent", "Tachiyomi Komga v${BuildConfig.VERSION_NAME}")
.add("User-Agent", "TachiyomiKomga/${BuildConfig.VERSION_NAME}")
private val preferences: SharedPreferences by lazy {
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)