Update some domain (#7137)
* VlogTruyen update domain * TruyenVN update domain * Yurineko Update domain and add override URL * NetTruyenCO update domain * Fecomic update domain * DuaLeoTruyen Update domain * CoManhua Update domain * HentaiVNPlus update domain * Update src/vi/yurineko/src/eu/kanade/tachiyomi/extension/vi/yurineko/YuriNeko.kt Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com> --------- Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com>
This commit is contained in:
parent
5687f616b2
commit
c9af13410f
|
@ -2,8 +2,8 @@ ext {
|
||||||
extName = 'CoManhua'
|
extName = 'CoManhua'
|
||||||
extClass = '.CoManhua'
|
extClass = '.CoManhua'
|
||||||
themePkg = 'wpcomics'
|
themePkg = 'wpcomics'
|
||||||
baseUrl = 'https://comanhuaw.com'
|
baseUrl = 'https://comanhuaa.com'
|
||||||
overrideVersionCode = 1
|
overrideVersionCode = 2
|
||||||
isNsfw = false
|
isNsfw = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ import java.util.TimeZone
|
||||||
|
|
||||||
class CoManhua : WPComics(
|
class CoManhua : WPComics(
|
||||||
"CoManhua",
|
"CoManhua",
|
||||||
"https://comanhuaw.com",
|
"https://comanhuaa.com",
|
||||||
"vi",
|
"vi",
|
||||||
gmtOffset = null,
|
gmtOffset = null,
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = "Dua Leo Truyen"
|
extName = "Dua Leo Truyen"
|
||||||
extClass = ".DuaLeoTruyen"
|
extClass = ".DuaLeoTruyen"
|
||||||
extVersionCode = 6
|
extVersionCode = 7
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ class DuaLeoTruyen : ParsedHttpSource() {
|
||||||
|
|
||||||
override val name = "Dưa Leo Truyện"
|
override val name = "Dưa Leo Truyện"
|
||||||
|
|
||||||
override val baseUrl = "https://dualeotruyenman.com"
|
override val baseUrl = "https://dualeotruyenbeta.com"
|
||||||
|
|
||||||
override val lang = "vi"
|
override val lang = "vi"
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ ext {
|
||||||
extName = 'Fecomic'
|
extName = 'Fecomic'
|
||||||
extClass = '.Fecomic'
|
extClass = '.Fecomic'
|
||||||
themePkg = 'madara'
|
themePkg = 'madara'
|
||||||
baseUrl = 'https://fecomicc.xyz'
|
baseUrl = 'https://mangasup.net'
|
||||||
overrideVersionCode = 0
|
overrideVersionCode = 1
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.util.Locale
|
||||||
|
|
||||||
class Fecomic : Madara(
|
class Fecomic : Madara(
|
||||||
"Fecomic",
|
"Fecomic",
|
||||||
"https://fecomicc.xyz",
|
"https://mangasup.net",
|
||||||
"vi",
|
"vi",
|
||||||
dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.ROOT),
|
dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.ROOT),
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -2,8 +2,8 @@ ext {
|
||||||
extName = 'HentaiVN.plus'
|
extName = 'HentaiVN.plus'
|
||||||
extClass = '.HentaiVNPlus'
|
extClass = '.HentaiVNPlus'
|
||||||
themePkg = 'madara'
|
themePkg = 'madara'
|
||||||
baseUrl = 'https://hentaivn.now'
|
baseUrl = 'https://hentaivn.li'
|
||||||
overrideVersionCode = 5
|
overrideVersionCode = 6
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import java.util.Locale
|
||||||
class HentaiVNPlus :
|
class HentaiVNPlus :
|
||||||
Madara(
|
Madara(
|
||||||
"HentaiVN.plus",
|
"HentaiVN.plus",
|
||||||
"https://hentaivn.now",
|
"https://hentaivn.li",
|
||||||
"vi",
|
"vi",
|
||||||
dateFormat = SimpleDateFormat("MM/dd/yyyy", Locale.ROOT),
|
dateFormat = SimpleDateFormat("MM/dd/yyyy", Locale.ROOT),
|
||||||
),
|
),
|
||||||
|
|
|
@ -2,8 +2,8 @@ ext {
|
||||||
extName = 'NetTruyenCO (unoriginal)'
|
extName = 'NetTruyenCO (unoriginal)'
|
||||||
extClass = '.NetTruyenCO'
|
extClass = '.NetTruyenCO'
|
||||||
themePkg = 'wpcomics'
|
themePkg = 'wpcomics'
|
||||||
baseUrl = 'https://nettruyenww.com'
|
baseUrl = 'https://nettruyenrr.com'
|
||||||
overrideVersionCode = 3
|
overrideVersionCode = 4
|
||||||
isNsfw = false
|
isNsfw = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Locale
|
||||||
|
|
||||||
class NetTruyenCO : WPComics(
|
class NetTruyenCO : WPComics(
|
||||||
"NetTruyenCO (unoriginal)",
|
"NetTruyenCO (unoriginal)",
|
||||||
"https://nettruyenww.com",
|
"https://nettruyenrr.com",
|
||||||
"vi",
|
"vi",
|
||||||
dateFormat = SimpleDateFormat("dd/MM/yy", Locale.getDefault()),
|
dateFormat = SimpleDateFormat("dd/MM/yy", Locale.getDefault()),
|
||||||
gmtOffset = null,
|
gmtOffset = null,
|
||||||
|
|
|
@ -2,8 +2,8 @@ ext {
|
||||||
extName = 'TruyenVN'
|
extName = 'TruyenVN'
|
||||||
extClass = '.TruyenVN'
|
extClass = '.TruyenVN'
|
||||||
themePkg = 'madara'
|
themePkg = 'madara'
|
||||||
baseUrl = 'https://truyenvn.live'
|
baseUrl = 'https://truyenvn.la'
|
||||||
overrideVersionCode = 9
|
overrideVersionCode = 10
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import java.util.Locale
|
||||||
class TruyenVN :
|
class TruyenVN :
|
||||||
Madara(
|
Madara(
|
||||||
"TruyenVN",
|
"TruyenVN",
|
||||||
"https://truyenvn.live",
|
"https://truyenvn.la",
|
||||||
"vi",
|
"vi",
|
||||||
dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.ROOT),
|
dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.ROOT),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'VlogTruyen'
|
extName = 'VlogTruyen'
|
||||||
extClass = '.VlogTruyen'
|
extClass = '.VlogTruyen'
|
||||||
extVersionCode = 3
|
extVersionCode = 4
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ class VlogTruyen : ParsedHttpSource(), ConfigurableSource {
|
||||||
|
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
private val defaultBaseUrl = "https://vlogtruyen35.com"
|
private val defaultBaseUrl = "https://vlogtruyen36.com"
|
||||||
|
|
||||||
override val baseUrl by lazy { getPrefBaseUrl() }
|
override val baseUrl by lazy { getPrefBaseUrl() }
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
<data android:host="yurineko.my"
|
<data android:host="yurineko.click"
|
||||||
android:scheme="https" />
|
android:scheme="https" />
|
||||||
|
|
||||||
<data android:pathPattern="/manga/..*" />
|
<data android:pathPattern="/manga/..*" />
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'YuriNeko'
|
extName = 'YuriNeko'
|
||||||
extClass = '.YuriNeko'
|
extClass = '.YuriNeko'
|
||||||
extVersionCode = 5
|
extVersionCode = 6
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
package eu.kanade.tachiyomi.extension.vi.yurineko
|
package eu.kanade.tachiyomi.extension.vi.yurineko
|
||||||
|
|
||||||
|
import android.app.Application
|
||||||
|
import android.content.SharedPreferences
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.preference.EditTextPreference
|
||||||
|
import androidx.preference.PreferenceScreen
|
||||||
import eu.kanade.tachiyomi.extension.vi.yurineko.dto.ErrorResponseDto
|
import eu.kanade.tachiyomi.extension.vi.yurineko.dto.ErrorResponseDto
|
||||||
import eu.kanade.tachiyomi.extension.vi.yurineko.dto.MangaDto
|
import eu.kanade.tachiyomi.extension.vi.yurineko.dto.MangaDto
|
||||||
import eu.kanade.tachiyomi.extension.vi.yurineko.dto.MangaListDto
|
import eu.kanade.tachiyomi.extension.vi.yurineko.dto.MangaListDto
|
||||||
|
@ -8,6 +13,7 @@ import eu.kanade.tachiyomi.extension.vi.yurineko.dto.UserDto
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||||
|
import eu.kanade.tachiyomi.source.ConfigurableSource
|
||||||
import eu.kanade.tachiyomi.source.model.Filter
|
import eu.kanade.tachiyomi.source.model.Filter
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
import eu.kanade.tachiyomi.source.model.MangasPage
|
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||||
|
@ -24,21 +30,25 @@ import okhttp3.Interceptor
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
|
import uy.kohesive.injekt.Injekt
|
||||||
|
import uy.kohesive.injekt.api.get
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.net.URLDecoder
|
import java.net.URLDecoder
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class YuriNeko : HttpSource() {
|
class YuriNeko : HttpSource(), ConfigurableSource {
|
||||||
|
|
||||||
override val name = "YuriNeko"
|
override val name = "YuriNeko"
|
||||||
|
|
||||||
override val baseUrl = "https://yurineko.my"
|
private val defaultDomain = "yurineko.click"
|
||||||
|
|
||||||
|
override val baseUrl by lazy { "https://${getPrefDomain()}" }
|
||||||
|
|
||||||
override val lang = "vi"
|
override val lang = "vi"
|
||||||
|
|
||||||
override val supportsLatest = false
|
override val supportsLatest = false
|
||||||
|
|
||||||
private val apiUrl = "https://api.yurineko.my"
|
private val apiUrl by lazy { "https://api.${getPrefDomain()}" }
|
||||||
|
|
||||||
override val client = network.cloudflareClient.newBuilder()
|
override val client = network.cloudflareClient.newBuilder()
|
||||||
.rateLimit(3, 1, TimeUnit.SECONDS)
|
.rateLimit(3, 1, TimeUnit.SECONDS)
|
||||||
|
@ -396,6 +406,36 @@ class YuriNeko : HttpSource() {
|
||||||
private inline fun <reified T> Response.parseAs(): T = use {
|
private inline fun <reified T> Response.parseAs(): T = use {
|
||||||
json.decodeFromString(body.string())
|
json.decodeFromString(body.string())
|
||||||
}
|
}
|
||||||
|
private val preferences: SharedPreferences =
|
||||||
|
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
||||||
|
|
||||||
|
init {
|
||||||
|
preferences.getString(DEFAULT_DOMAIN_PREF, null).let { prefDefaultDomain ->
|
||||||
|
if (prefDefaultDomain != defaultDomain) {
|
||||||
|
preferences.edit()
|
||||||
|
.putString(BASE_DOMAIN_PREF, defaultDomain)
|
||||||
|
.putString(DEFAULT_DOMAIN_PREF, defaultDomain)
|
||||||
|
.apply()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
override fun setupPreferenceScreen(screen: PreferenceScreen) {
|
||||||
|
EditTextPreference(screen.context).apply {
|
||||||
|
key = BASE_DOMAIN_PREF
|
||||||
|
title = BASE_DOMAIN_PREF_TITLE
|
||||||
|
summary = BASE_DOMAIN_PREF_SUMMARY
|
||||||
|
setDefaultValue(defaultDomain)
|
||||||
|
dialogTitle = BASE_DOMAIN_PREF_TITLE
|
||||||
|
dialogMessage = "Default: $defaultDomain"
|
||||||
|
|
||||||
|
setOnPreferenceChangeListener { _, _ ->
|
||||||
|
Toast.makeText(screen.context, RESTART_APP, Toast.LENGTH_LONG).show()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
}.let(screen::addPreference)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getPrefDomain(): String = preferences.getString(BASE_DOMAIN_PREF, defaultDomain)!!
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val PREFIX_ID_SEARCH = "id:"
|
const val PREFIX_ID_SEARCH = "id:"
|
||||||
|
@ -404,5 +444,11 @@ class YuriNeko : HttpSource() {
|
||||||
const val PREFIX_AUTHOR_SEARCH = "author:"
|
const val PREFIX_AUTHOR_SEARCH = "author:"
|
||||||
const val PREFIX_DOUJIN_SEARCH = "origin:"
|
const val PREFIX_DOUJIN_SEARCH = "origin:"
|
||||||
const val PREFIX_COUPLE_SEARCH = "couple:"
|
const val PREFIX_COUPLE_SEARCH = "couple:"
|
||||||
|
private const val DEFAULT_DOMAIN_PREF = "defaultDomain"
|
||||||
|
private const val RESTART_APP = "Khởi chạy lại ứng dụng để áp dụng thay đổi."
|
||||||
|
private const val BASE_DOMAIN_PREF_TITLE = "Ghi đè URL cơ sở"
|
||||||
|
private const val BASE_DOMAIN_PREF = "overrideDomain"
|
||||||
|
private const val BASE_DOMAIN_PREF_SUMMARY =
|
||||||
|
"Dành cho sử dụng tạm thời, cập nhật tiện ích sẽ xóa cài đặt."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue