mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-06-30 17:34:39 -05:00
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
|
||||
// }
|
||||
//}
|
||||
|
||||
// }
|
||||
|
||||
@@ -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
|
||||
// )
|
||||
//}
|
||||
// }
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user