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:
are-are-are 2025-01-15 19:47:34 +07:00 committed by Draff
parent 5687f616b2
commit c9af13410f
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
17 changed files with 70 additions and 24 deletions

View File

@ -2,8 +2,8 @@ ext {
extName = 'CoManhua'
extClass = '.CoManhua'
themePkg = 'wpcomics'
baseUrl = 'https://comanhuaw.com'
overrideVersionCode = 1
baseUrl = 'https://comanhuaa.com'
overrideVersionCode = 2
isNsfw = false
}

View File

@ -19,7 +19,7 @@ import java.util.TimeZone
class CoManhua : WPComics(
"CoManhua",
"https://comanhuaw.com",
"https://comanhuaa.com",
"vi",
gmtOffset = null,
) {

View File

@ -1,7 +1,7 @@
ext {
extName = "Dua Leo Truyen"
extClass = ".DuaLeoTruyen"
extVersionCode = 6
extVersionCode = 7
isNsfw = true
}

View File

@ -22,7 +22,7 @@ class DuaLeoTruyen : ParsedHttpSource() {
override val name = "Dưa Leo Truyện"
override val baseUrl = "https://dualeotruyenman.com"
override val baseUrl = "https://dualeotruyenbeta.com"
override val lang = "vi"

View File

@ -2,8 +2,8 @@ ext {
extName = 'Fecomic'
extClass = '.Fecomic'
themePkg = 'madara'
baseUrl = 'https://fecomicc.xyz'
overrideVersionCode = 0
baseUrl = 'https://mangasup.net'
overrideVersionCode = 1
isNsfw = true
}

View File

@ -10,7 +10,7 @@ import java.util.Locale
class Fecomic : Madara(
"Fecomic",
"https://fecomicc.xyz",
"https://mangasup.net",
"vi",
dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.ROOT),
) {

View File

@ -2,8 +2,8 @@ ext {
extName = 'HentaiVN.plus'
extClass = '.HentaiVNPlus'
themePkg = 'madara'
baseUrl = 'https://hentaivn.now'
overrideVersionCode = 5
baseUrl = 'https://hentaivn.li'
overrideVersionCode = 6
isNsfw = true
}

View File

@ -14,7 +14,7 @@ import java.util.Locale
class HentaiVNPlus :
Madara(
"HentaiVN.plus",
"https://hentaivn.now",
"https://hentaivn.li",
"vi",
dateFormat = SimpleDateFormat("MM/dd/yyyy", Locale.ROOT),
),

View File

@ -2,8 +2,8 @@ ext {
extName = 'NetTruyenCO (unoriginal)'
extClass = '.NetTruyenCO'
themePkg = 'wpcomics'
baseUrl = 'https://nettruyenww.com'
overrideVersionCode = 3
baseUrl = 'https://nettruyenrr.com'
overrideVersionCode = 4
isNsfw = false
}

View File

@ -8,7 +8,7 @@ import java.util.Locale
class NetTruyenCO : WPComics(
"NetTruyenCO (unoriginal)",
"https://nettruyenww.com",
"https://nettruyenrr.com",
"vi",
dateFormat = SimpleDateFormat("dd/MM/yy", Locale.getDefault()),
gmtOffset = null,

View File

@ -2,8 +2,8 @@ ext {
extName = 'TruyenVN'
extClass = '.TruyenVN'
themePkg = 'madara'
baseUrl = 'https://truyenvn.live'
overrideVersionCode = 9
baseUrl = 'https://truyenvn.la'
overrideVersionCode = 10
isNsfw = true
}

View File

@ -14,7 +14,7 @@ import java.util.Locale
class TruyenVN :
Madara(
"TruyenVN",
"https://truyenvn.live",
"https://truyenvn.la",
"vi",
dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.ROOT),
),

View File

@ -1,7 +1,7 @@
ext {
extName = 'VlogTruyen'
extClass = '.VlogTruyen'
extVersionCode = 3
extVersionCode = 4
isNsfw = true
}

View File

@ -41,7 +41,7 @@ class VlogTruyen : ParsedHttpSource(), ConfigurableSource {
override val supportsLatest = true
private val defaultBaseUrl = "https://vlogtruyen35.com"
private val defaultBaseUrl = "https://vlogtruyen36.com"
override val baseUrl by lazy { getPrefBaseUrl() }

View File

@ -12,7 +12,7 @@
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="yurineko.my"
<data android:host="yurineko.click"
android:scheme="https" />
<data android:pathPattern="/manga/..*" />

View File

@ -1,7 +1,7 @@
ext {
extName = 'YuriNeko'
extClass = '.YuriNeko'
extVersionCode = 5
extVersionCode = 6
isNsfw = true
}

View File

@ -1,5 +1,10 @@
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.MangaDto
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.asObservableSuccess
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.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
@ -24,21 +30,25 @@ import okhttp3.Interceptor
import okhttp3.Request
import okhttp3.Response
import rx.Observable
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.io.IOException
import java.net.URLDecoder
import java.util.concurrent.TimeUnit
class YuriNeko : HttpSource() {
class YuriNeko : HttpSource(), ConfigurableSource {
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 supportsLatest = false
private val apiUrl = "https://api.yurineko.my"
private val apiUrl by lazy { "https://api.${getPrefDomain()}" }
override val client = network.cloudflareClient.newBuilder()
.rateLimit(3, 1, TimeUnit.SECONDS)
@ -396,6 +406,36 @@ class YuriNeko : HttpSource() {
private inline fun <reified T> Response.parseAs(): T = use {
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 {
const val PREFIX_ID_SEARCH = "id:"
@ -404,5 +444,11 @@ class YuriNeko : HttpSource() {
const val PREFIX_AUTHOR_SEARCH = "author:"
const val PREFIX_DOUJIN_SEARCH = "origin:"
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."
}
}