move dex2jar to server, lint
This commit is contained in:
@@ -79,10 +79,6 @@ configure(projects) {
|
||||
// to get application content root
|
||||
implementation("net.harawata:appdirs:1.2.1")
|
||||
|
||||
// dex2jar: https://github.com/DexPatcher/dex2jar/releases/tag/v2.1-20190905-lanchon
|
||||
// note: watch https://github.com/ThexXTURBOXx/dex2jar for future development
|
||||
implementation("com.github.DexPatcher.dex2jar:dex-tools:v2.1-20190905-lanchon")
|
||||
|
||||
// APK parser
|
||||
implementation("net.dongliu:apk-parser:2.6.10")
|
||||
|
||||
|
||||
@@ -63,6 +63,10 @@ dependencies {
|
||||
implementation("com.github.salomonbrys.kotson:kotson:2.5.0")
|
||||
|
||||
|
||||
// dex2jar: https://github.com/DexPatcher/dex2jar/releases/tag/v2.1-20190905-lanchon
|
||||
// note: watch https://github.com/ThexXTURBOXx/dex2jar for future developments
|
||||
implementation("com.github.DexPatcher.dex2jar:dex-tools:v2.1-20190905-lanchon")
|
||||
|
||||
// asm for fixing SimpleDateFormat (must match Dex2Jar version)
|
||||
implementation("org.ow2.asm:asm-debug-all:5.0.3")
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ interface SManga : Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
//fun SManga.toMangaInfo(): MangaInfo {
|
||||
// fun SManga.toMangaInfo(): MangaInfo {
|
||||
// return MangaInfo(
|
||||
// key = this.url,
|
||||
// title = this.title,
|
||||
@@ -73,9 +73,9 @@ interface SManga : Serializable {
|
||||
// status = this.status,
|
||||
// cover = this.thumbnail_url ?: ""
|
||||
// )
|
||||
//}
|
||||
// }
|
||||
//
|
||||
//fun MangaInfo.toSManga(): SManga {
|
||||
// fun MangaInfo.toSManga(): SManga {
|
||||
// val mangaInfo = this
|
||||
// return SManga.create().apply {
|
||||
// url = mangaInfo.key
|
||||
@@ -87,5 +87,4 @@ interface SManga : Serializable {
|
||||
// status = mangaInfo.status
|
||||
// thumbnail_url = mangaInfo.cover
|
||||
// }
|
||||
//}
|
||||
|
||||
// }
|
||||
|
||||
+1
-1
@@ -9,4 +9,4 @@ package suwayomi.tachidesk.manga.impl.backup
|
||||
|
||||
abstract class AbstractBackupValidator {
|
||||
data class ValidationResult(val missingSources: List<String>, val missingTrackers: List<String>)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import suwayomi.tachidesk.manga.impl.backup.AbstractBackupValidator
|
||||
import suwayomi.tachidesk.manga.impl.backup.legacy.models.Backup
|
||||
import suwayomi.tachidesk.manga.model.table.SourceTable
|
||||
|
||||
object LegacyBackupValidator: AbstractBackupValidator() {
|
||||
object LegacyBackupValidator : AbstractBackupValidator() {
|
||||
|
||||
/**
|
||||
* Checks for critical backup file data.
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package suwayomi.tachidesk.manga.impl.backup.models
|
||||
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
//import eu.kanade.tachiyomi.ui.reader.setting.OrientationType
|
||||
//import eu.kanade.tachiyomi.ui.reader.setting.ReadingModeType
|
||||
|
||||
// import eu.kanade.tachiyomi.ui.reader.setting.OrientationType
|
||||
// import eu.kanade.tachiyomi.ui.reader.setting.ReadingModeType
|
||||
|
||||
// substitute for eu.kanade.tachiyomi.ui.reader.setting.OrientationType
|
||||
object OrientationType {
|
||||
@@ -15,7 +14,6 @@ object ReadingModeType {
|
||||
const val MASK = 0x00000007
|
||||
}
|
||||
|
||||
|
||||
interface Manga : SManga {
|
||||
|
||||
var id: Long?
|
||||
@@ -129,7 +127,7 @@ interface Manga : SManga {
|
||||
}
|
||||
}
|
||||
|
||||
//fun Manga.toMangaInfo(): MangaInfo {
|
||||
// fun Manga.toMangaInfo(): MangaInfo {
|
||||
// return MangaInfo(
|
||||
// artist = this.artist ?: "",
|
||||
// author = this.author ?: "",
|
||||
@@ -140,4 +138,4 @@ interface Manga : SManga {
|
||||
// status = this.status,
|
||||
// title = this.title
|
||||
// )
|
||||
//}
|
||||
// }
|
||||
|
||||
@@ -72,7 +72,7 @@ open class MangaImpl : Manga {
|
||||
url = mangaRecord[MangaTable.url]
|
||||
title = mangaRecord[MangaTable.title]
|
||||
source = mangaRecord[MangaTable.sourceReference]
|
||||
viewer_flags = 0 // TODO: implement
|
||||
viewer_flags = 0 // TODO: implement
|
||||
chapter_flags = 0 // TODO: implement
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -13,4 +13,4 @@ open class ProtoBackupBase {
|
||||
var sourceMapping: Map<Long, String> = emptyMap()
|
||||
|
||||
val parser = ProtoBuf
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@ import suwayomi.tachidesk.manga.impl.backup.proto.models.Backup
|
||||
import suwayomi.tachidesk.manga.impl.backup.proto.models.BackupSerializer
|
||||
import java.io.ByteArrayOutputStream
|
||||
|
||||
object ProtoBackupExport: ProtoBackupBase() {
|
||||
object ProtoBackupExport : ProtoBackupBase() {
|
||||
suspend fun createBackup(flags: BackupFlags): ByteArray {
|
||||
// Create root object
|
||||
var backup: Backup? = null
|
||||
@@ -38,4 +38,4 @@ object ProtoBackupExport: ProtoBackupBase() {
|
||||
|
||||
return byteStream.toByteArray()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-3
@@ -20,7 +20,7 @@ import java.io.InputStream
|
||||
|
||||
private val logger = KotlinLogging.logger {}
|
||||
|
||||
object ProtoBackupImport: ProtoBackupBase() {
|
||||
object ProtoBackupImport : ProtoBackupBase() {
|
||||
var restoreAmount = 0
|
||||
|
||||
suspend fun performRestore(sourceStream: InputStream): ValidationResult {
|
||||
@@ -59,7 +59,6 @@ object ProtoBackupImport: ProtoBackupBase() {
|
||||
// showRestoreProgress(restoreProgress, restoreAmount, context.getString(R.string.categories))
|
||||
}
|
||||
|
||||
|
||||
private fun restoreManga(backupManga: BackupManga, backupCategories: List<BackupCategory>) { // TODO
|
||||
// val manga = backupManga.getMangaImpl()
|
||||
// val chapters = backupManga.getChaptersImpl()
|
||||
@@ -77,4 +76,4 @@ object ProtoBackupImport: ProtoBackupBase() {
|
||||
// restoreProgress += 1
|
||||
// showRestoreProgress(restoreProgress, restoreAmount, manga.title)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ import suwayomi.tachidesk.manga.impl.backup.AbstractBackupValidator
|
||||
import suwayomi.tachidesk.manga.impl.backup.proto.models.Backup
|
||||
import suwayomi.tachidesk.manga.model.table.SourceTable
|
||||
|
||||
object ProtoBackupValidator: AbstractBackupValidator() {
|
||||
object ProtoBackupValidator : AbstractBackupValidator() {
|
||||
fun validate(backup: Backup): ValidationResult {
|
||||
if (backup.backupManga.isEmpty()) {
|
||||
throw Exception("Backup does not contain any manga.")
|
||||
@@ -42,4 +42,4 @@ object ProtoBackupValidator: AbstractBackupValidator() {
|
||||
|
||||
return ValidationResult(missingSources, missingTrackers)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user