pull/311/head
Koitharu 3 years ago
parent 0e4575356a
commit 9b8b6d789e
No known key found for this signature in database
GPG Key ID: 8E861F8CE6E7CE27

@ -77,7 +77,7 @@ afterEvaluate {
} }
dependencies { dependencies {
//noinspection GradleDependency //noinspection GradleDependency
implementation('com.github.KotatsuApp:kotatsu-parsers:413f4a2f10') { implementation('com.github.KotatsuApp:kotatsu-parsers:93f5f70d79') {
exclude group: 'org.json', module: 'json' exclude group: 'org.json', module: 'json'
} }

@ -52,7 +52,6 @@ fun Parcel.readManga() = Manga(
fun MangaPage.writeToParcel(out: Parcel) { fun MangaPage.writeToParcel(out: Parcel) {
out.writeLong(id) out.writeLong(id)
out.writeString(url) out.writeString(url)
out.writeString(referer)
out.writeString(preview) out.writeString(preview)
out.writeSerializable(source) out.writeSerializable(source)
} }
@ -60,7 +59,6 @@ fun MangaPage.writeToParcel(out: Parcel) {
fun Parcel.readMangaPage() = MangaPage( fun Parcel.readMangaPage() = MangaPage(
id = readLong(), id = readLong(),
url = requireNotNull(readString()), url = requireNotNull(readString()),
referer = requireNotNull(readString()),
preview = readString(), preview = readString(),
source = checkNotNull(readSerializableCompat()), source = checkNotNull(readSerializableCompat()),
) )

@ -96,7 +96,6 @@ class LocalMangaDirInput(root: File) : LocalMangaInput(root) {
id = pageUri.longHashCode(), id = pageUri.longHashCode(),
url = pageUri, url = pageUri,
preview = null, preview = null,
referer = chapter.url,
source = MangaSource.LOCAL, source = MangaSource.LOCAL,
) )
} }
@ -113,7 +112,6 @@ class LocalMangaDirInput(root: File) : LocalMangaInput(root) {
id = pageUri.longHashCode(), id = pageUri.longHashCode(),
url = pageUri, url = pageUri,
preview = null, preview = null,
referer = chapter.url,
source = MangaSource.LOCAL, source = MangaSource.LOCAL,
) )
} }

@ -132,7 +132,6 @@ class LocalMangaZipInput(root: File) : LocalMangaInput(root) {
id = entryUri.longHashCode(), id = entryUri.longHashCode(),
url = entryUri, url = entryUri,
preview = null, preview = null,
referer = chapter.url,
source = MangaSource.LOCAL, source = MangaSource.LOCAL,
) )
} }

@ -83,10 +83,6 @@ class LocalMangaDirOutput(
} }
} }
override fun sortChaptersByName() {
index.sortChaptersByName()
}
suspend fun deleteChapter(chapterId: Long) { suspend fun deleteChapter(chapterId: Long) {
val chapter = checkNotNull(index.getMangaInfo()?.chapters) { val chapter = checkNotNull(index.getMangaInfo()?.chapters) {
"No chapters found" "No chapters found"

@ -22,9 +22,6 @@ abstract class LocalMangaOutput(
abstract suspend fun cleanup() abstract suspend fun cleanup()
// TODO remove
abstract fun sortChaptersByName()
companion object { companion object {
const val ENTRY_NAME_INDEX = "index.json" const val ENTRY_NAME_INDEX = "index.json"

@ -80,10 +80,6 @@ class LocalMangaZipOutput(
output.close() output.close()
} }
override fun sortChaptersByName() {
index.sortChaptersByName()
}
@WorkerThread @WorkerThread
private fun mergeWith(other: File) { private fun mergeWith(other: File) {
var otherIndex: MangaIndex? = null var otherIndex: MangaIndex? = null

@ -191,7 +191,6 @@ class PageLoader @Inject constructor(
val request = Request.Builder() val request = Request.Builder()
.url(pageUrl) .url(pageUrl)
.get() .get()
.header(CommonHeaders.REFERER, page.referer)
.header(CommonHeaders.ACCEPT, "image/webp,image/png;q=0.9,image/jpeg,*/*;q=0.8") .header(CommonHeaders.ACCEPT, "image/webp,image/png;q=0.9,image/jpeg,*/*;q=0.8")
.cacheControl(CommonHeaders.CACHE_CONTROL_NO_STORE) .cacheControl(CommonHeaders.CACHE_CONTROL_NO_STORE)
.tag(MangaSource::class.java, page.source) .tag(MangaSource::class.java, page.source)

@ -47,7 +47,6 @@ class ColorFilterConfigViewModel @Inject constructor(
MangaPage( MangaPage(
id = page.id, id = page.id,
url = url, url = url,
referer = page.referer,
preview = page.preview, preview = page.preview,
source = page.source, source = page.source,
), ),

@ -9,7 +9,6 @@ import org.koitharu.kotatsu.parsers.model.MangaSource
data class ReaderPage( data class ReaderPage(
val id: Long, val id: Long,
val url: String, val url: String,
val referer: String,
val preview: String?, val preview: String?,
val chapterId: Long, val chapterId: Long,
val index: Int, val index: Int,
@ -19,7 +18,6 @@ data class ReaderPage(
constructor(page: MangaPage, index: Int, chapterId: Long) : this( constructor(page: MangaPage, index: Int, chapterId: Long) : this(
id = page.id, id = page.id,
url = page.url, url = page.url,
referer = page.referer,
preview = page.preview, preview = page.preview,
chapterId = chapterId, chapterId = chapterId,
index = index, index = index,
@ -29,7 +27,6 @@ data class ReaderPage(
fun toMangaPage() = MangaPage( fun toMangaPage() = MangaPage(
id = id, id = id,
url = url, url = url,
referer = referer,
preview = preview, preview = preview,
source = source, source = source,
) )

@ -70,7 +70,6 @@ class ChapterPagesTest {
private fun page(chapterId: Long) = ReaderPage( private fun page(chapterId: Long) = ReaderPage(
id = Random.nextLong(), id = Random.nextLong(),
url = "http://localhost", url = "http://localhost",
referer = "http://localhost",
preview = null, preview = null,
chapterId = chapterId, chapterId = chapterId,
index = Random.nextInt(), index = Random.nextInt(),

Loading…
Cancel
Save