Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dfb88feaf0 | |||
|
|
149b171eda | ||
|
|
c70a2487d9 | ||
| 865f335b25 | |||
| 6b1e89eda8 | |||
| 0dbaf919e2 |
@@ -15,8 +15,8 @@ android {
|
||||
applicationId 'org.koitharu.kotatsu'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 33
|
||||
versionCode 522
|
||||
versionName '4.4.6'
|
||||
versionCode 524
|
||||
versionName '4.4.8'
|
||||
generatedDensities = []
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -59,7 +59,7 @@ android {
|
||||
]
|
||||
}
|
||||
lint {
|
||||
abortOnError false
|
||||
abortOnError true
|
||||
disable 'MissingTranslation', 'PrivateResource', 'NotifyDataSetChanged'
|
||||
}
|
||||
testOptions {
|
||||
@@ -79,7 +79,7 @@ afterEvaluate {
|
||||
}
|
||||
dependencies {
|
||||
//noinspection GradleDependency
|
||||
implementation('com.github.KotatsuApp:kotatsu-parsers:cc418570d5') {
|
||||
implementation('com.github.KotatsuApp:kotatsu-parsers:2340100999') {
|
||||
exclude group: 'org.json', module: 'json'
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.koitharu.kotatsu.core.parser
|
||||
|
||||
import android.util.Log
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -9,6 +10,7 @@ import kotlinx.coroutines.currentCoroutineContext
|
||||
import okhttp3.Headers
|
||||
import okhttp3.Interceptor
|
||||
import okhttp3.Response
|
||||
import org.koitharu.kotatsu.BuildConfig
|
||||
import org.koitharu.kotatsu.core.cache.ContentCache
|
||||
import org.koitharu.kotatsu.core.cache.SafeDeferred
|
||||
import org.koitharu.kotatsu.core.prefs.SourceSettings
|
||||
@@ -77,7 +79,7 @@ class RemoteMangaRepository(
|
||||
override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
|
||||
cache.getPages(source, chapter.url)?.let { return it }
|
||||
val pages = asyncSafe {
|
||||
parser.getPages(chapter)
|
||||
parser.getPages(chapter).distinctById()
|
||||
}
|
||||
cache.putPages(source, chapter.url, pages)
|
||||
return pages.await()
|
||||
@@ -108,4 +110,20 @@ class RemoteMangaRepository(
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
private fun List<MangaPage>.distinctById(): List<MangaPage> {
|
||||
if (isEmpty()) {
|
||||
return emptyList()
|
||||
}
|
||||
val result = ArrayList<MangaPage>(size)
|
||||
val set = HashSet<Long>(size)
|
||||
for (page in this) {
|
||||
if (set.add(page.id)) {
|
||||
result.add(page)
|
||||
} else if (BuildConfig.DEBUG) {
|
||||
Log.w(null, "Duplicate page: $page")
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,4 +408,17 @@
|
||||
<string name="download_started">Nagsimula na ang pag-download</string>
|
||||
<string name="color_theme">Scheme ng kulay</string>
|
||||
<string name="theme_name_miku">Miku</string>
|
||||
<string name="user_agent">Header ng UserAgent</string>
|
||||
<string name="cache">Cache</string>
|
||||
<string name="text_file_sizes">B|kB|MB|GB|TB</string>
|
||||
<string name="standard">Standard</string>
|
||||
<string name="webtoon">Webtoon</string>
|
||||
<string name="read_mode">Read mode</string>
|
||||
<string name="error">Error</string>
|
||||
<string name="internal_storage">Internal storage</string>
|
||||
<string name="external_storage">External storage</string>
|
||||
<string name="vibration">Vibration</string>
|
||||
<string name="domain">Domain</string>
|
||||
<string name="light_indicator">LED indicator</string>
|
||||
<string name="settings_apply_restart_required">Mangyaring i-restart ang application upang ilapat ang mga pagbabagong ito</string>
|
||||
</resources>
|
||||
2
app/src/main/res/values-nn/plurals.xml
Normal file
2
app/src/main/res/values-nn/plurals.xml
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
2
app/src/main/res/values-nn/strings.xml
Normal file
2
app/src/main/res/values-nn/strings.xml
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
@@ -4,5 +4,4 @@
|
||||
<dimen name="grid_spacing_outer">2dp</dimen>
|
||||
<dimen name="preferred_grid_width">140dp</dimen>
|
||||
<dimen name="bottom_sheet_width">420dp</dimen>
|
||||
<dimen name="fragment_horizontal_margin">48dp</dimen>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -405,8 +405,6 @@
|
||||
<string name="show_suspicious_content">显示可疑内容</string>
|
||||
<string name="theme_name_dynamic">动态</string>
|
||||
<string name="color_theme">颜色方案</string>
|
||||
<string name="theme_name_mint">薄荷绿</string>
|
||||
<string name="theme_name_october">October</string>
|
||||
<string name="show_in_grid_view">用网格视图显示</string>
|
||||
<string name="theme_name_miku">Miku</string>
|
||||
<string name="theme_name_asuka">Asuka</string>
|
||||
|
||||
Reference in New Issue
Block a user