diff --git a/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/ApplicationRootDir.kt b/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/ApplicationRootDir.kt index 83b68c2..25c47f6 100644 --- a/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/ApplicationRootDir.kt +++ b/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/ApplicationRootDir.kt @@ -12,7 +12,7 @@ import net.harawata.appdirs.AppDirsFactory val ApplicationRootDir: String get(): String { return System.getProperty( - "suwayomi.server.rootDir", + "suwayomi.tachidesk.server.rootDir", AppDirsFactory.getInstance().getUserDataDir("Tachidesk", null, null) ) } \ No newline at end of file diff --git a/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/Logging.kt b/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/Logging.kt index 0c6d5f1..80cdcbb 100644 --- a/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/Logging.kt +++ b/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/Logging.kt @@ -17,4 +17,4 @@ fun setLogLevel(level: Level) { } fun debugLogsEnabled(config: Config) - = System.getProperty("suwayomi.server.debugLogsEnabled", config.getString("server.debugLogsEnabled")).toBoolean() \ No newline at end of file + = System.getProperty("suwayomi.tachidesk.server.debugLogsEnabled", config.getString("server.debugLogsEnabled")).toBoolean() \ No newline at end of file diff --git a/scripts/resources/Tachidesk Debug Launcher.bat b/scripts/resources/Tachidesk Debug Launcher.bat index 2705add..33acd29 100644 --- a/scripts/resources/Tachidesk Debug Launcher.bat +++ b/scripts/resources/Tachidesk Debug Launcher.bat @@ -1 +1 @@ -jre\bin\java -Dsuwayomi.server.debugLogsEnabled=true -jar Tachidesk.jar +jre\bin\java -Dsuwayomi.tachidesk.server.debugLogsEnabled=true -jar Tachidesk.jar diff --git a/scripts/resources/Tachidesk Electron Launcher.bat b/scripts/resources/Tachidesk Electron Launcher.bat index 7c24329..3c951c0 100644 --- a/scripts/resources/Tachidesk Electron Launcher.bat +++ b/scripts/resources/Tachidesk Electron Launcher.bat @@ -1 +1 @@ -jre\bin\javaw "-Dsuwayomi.server.webInterface=electron" "-Dsuwayomi.server.electronPath=electron/electron.exe" -jar Tachidesk.jar +jre\bin\javaw "-Dsuwayomi.tachidesk.server.webInterface=electron" "-Dsuwayomi.tachidesk.server.electronPath=electron/electron.exe" -jar Tachidesk.jar diff --git a/server/build.gradle.kts b/server/build.gradle.kts index 3c0a746..dd0c462 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -73,7 +73,7 @@ dependencies { testImplementation(kotlin("test-junit5")) } -val MainClass = "suwayomi.MainKt" +val MainClass = "suwayomi.tachidesk.MainKt" application { mainClass.set(MainClass) diff --git a/server/src/main/kotlin/suwayomi/Main.kt b/server/src/main/kotlin/suwayomi/tachidesk/Main.kt similarity index 70% rename from server/src/main/kotlin/suwayomi/Main.kt rename to server/src/main/kotlin/suwayomi/tachidesk/Main.kt index 20e196a..d3d87f9 100644 --- a/server/src/main/kotlin/suwayomi/Main.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/Main.kt @@ -1,4 +1,4 @@ -package suwayomi +package suwayomi.tachidesk /* * Copyright (C) Contributors to the Suwayomi project @@ -7,8 +7,8 @@ package suwayomi * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import suwayomi.server.JavalinSetup.javalinSetup -import suwayomi.server.applicationSetup +import suwayomi.tachidesk.server.JavalinSetup.javalinSetup +import suwayomi.tachidesk.server.applicationSetup fun main() { applicationSetup() diff --git a/server/src/main/kotlin/suwayomi/anime/AnimeAPI.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/AnimeAPI.kt similarity index 93% rename from server/src/main/kotlin/suwayomi/anime/AnimeAPI.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/AnimeAPI.kt index 130418d..2deb497 100644 --- a/server/src/main/kotlin/suwayomi/anime/AnimeAPI.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/AnimeAPI.kt @@ -1,4 +1,4 @@ -package suwayomi.anime +package suwayomi.tachidesk.anime /* * Copyright (C) Contributors to the Suwayomi project @@ -8,20 +8,20 @@ package suwayomi.anime * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import io.javalin.Javalin -import suwayomi.anime.impl.Anime.getAnime -import suwayomi.anime.impl.Anime.getAnimeThumbnail -import suwayomi.anime.impl.AnimeList.getAnimeList -import suwayomi.anime.impl.Episode.getEpisode -import suwayomi.anime.impl.Episode.getEpisodeList -import suwayomi.anime.impl.Episode.modifyEpisode -import suwayomi.anime.impl.Source.getAnimeSource -import suwayomi.anime.impl.Source.getSourceList -import suwayomi.anime.impl.extension.Extension.getExtensionIcon -import suwayomi.anime.impl.extension.Extension.installExtension -import suwayomi.anime.impl.extension.Extension.uninstallExtension -import suwayomi.anime.impl.extension.Extension.updateExtension -import suwayomi.anime.impl.extension.ExtensionsList.getExtensionList -import suwayomi.server.JavalinSetup.future +import suwayomi.tachidesk.anime.impl.Anime.getAnime +import suwayomi.tachidesk.anime.impl.Anime.getAnimeThumbnail +import suwayomi.tachidesk.anime.impl.AnimeList.getAnimeList +import suwayomi.tachidesk.anime.impl.Episode.getEpisode +import suwayomi.tachidesk.anime.impl.Episode.getEpisodeList +import suwayomi.tachidesk.anime.impl.Episode.modifyEpisode +import suwayomi.tachidesk.anime.impl.Source.getAnimeSource +import suwayomi.tachidesk.anime.impl.Source.getSourceList +import suwayomi.tachidesk.anime.impl.extension.Extension.getExtensionIcon +import suwayomi.tachidesk.anime.impl.extension.Extension.installExtension +import suwayomi.tachidesk.anime.impl.extension.Extension.uninstallExtension +import suwayomi.tachidesk.anime.impl.extension.Extension.updateExtension +import suwayomi.tachidesk.anime.impl.extension.ExtensionsList.getExtensionList +import suwayomi.tachidesk.server.JavalinSetup.future object AnimeAPI { fun defineEndpoints(app: Javalin) { diff --git a/server/src/main/kotlin/suwayomi/anime/impl/Anime.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/Anime.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/anime/impl/Anime.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/impl/Anime.kt index 6b2786a..3c296df 100644 --- a/server/src/main/kotlin/suwayomi/anime/impl/Anime.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/Anime.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.impl +package suwayomi.tachidesk.anime.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -15,17 +15,17 @@ import org.jetbrains.exposed.sql.update import org.kodein.di.DI import org.kodein.di.conf.global import org.kodein.di.instance -import suwayomi.anime.impl.AnimeList.proxyThumbnailUrl -import suwayomi.anime.impl.Source.getAnimeSource -import suwayomi.anime.impl.util.GetAnimeHttpSource.getAnimeHttpSource -import suwayomi.anime.model.dataclass.AnimeDataClass -import suwayomi.anime.model.table.AnimeStatus -import suwayomi.anime.model.table.AnimeTable -import suwayomi.server.ApplicationDirs -import suwayomi.tachidesk.impl.util.lang.awaitSingle -import suwayomi.tachidesk.impl.util.network.await -import suwayomi.tachidesk.impl.util.storage.CachedImageResponse.clearCachedImage -import suwayomi.tachidesk.impl.util.storage.CachedImageResponse.getCachedImageResponse +import suwayomi.tachidesk.anime.impl.AnimeList.proxyThumbnailUrl +import suwayomi.tachidesk.anime.impl.Source.getAnimeSource +import suwayomi.tachidesk.anime.impl.util.GetAnimeHttpSource.getAnimeHttpSource +import suwayomi.tachidesk.anime.model.dataclass.AnimeDataClass +import suwayomi.tachidesk.anime.model.table.AnimeStatus +import suwayomi.tachidesk.anime.model.table.AnimeTable +import suwayomi.tachidesk.server.ApplicationDirs +import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle +import suwayomi.tachidesk.manga.impl.util.network.await +import suwayomi.tachidesk.manga.impl.util.storage.CachedImageResponse.clearCachedImage +import suwayomi.tachidesk.manga.impl.util.storage.CachedImageResponse.getCachedImageResponse import java.io.InputStream object Anime { diff --git a/server/src/main/kotlin/suwayomi/anime/impl/AnimeList.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/AnimeList.kt similarity index 89% rename from server/src/main/kotlin/suwayomi/anime/impl/AnimeList.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/impl/AnimeList.kt index 627c8e3..4fccdbb 100644 --- a/server/src/main/kotlin/suwayomi/anime/impl/AnimeList.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/AnimeList.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.impl +package suwayomi.tachidesk.anime.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -11,12 +11,12 @@ import eu.kanade.tachiyomi.animesource.model.AnimesPage import org.jetbrains.exposed.sql.insertAndGetId import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.anime.impl.util.GetAnimeHttpSource.getAnimeHttpSource -import suwayomi.anime.model.dataclass.AnimeDataClass -import suwayomi.anime.model.dataclass.PagedAnimeListDataClass -import suwayomi.anime.model.table.AnimeStatus -import suwayomi.anime.model.table.AnimeTable -import suwayomi.tachidesk.impl.util.lang.awaitSingle +import suwayomi.tachidesk.anime.impl.util.GetAnimeHttpSource.getAnimeHttpSource +import suwayomi.tachidesk.anime.model.dataclass.AnimeDataClass +import suwayomi.tachidesk.anime.model.dataclass.PagedAnimeListDataClass +import suwayomi.tachidesk.anime.model.table.AnimeStatus +import suwayomi.tachidesk.anime.model.table.AnimeTable +import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle object AnimeList { fun proxyThumbnailUrl(animeId: Int): String { diff --git a/server/src/main/kotlin/suwayomi/anime/impl/Episode.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/Episode.kt similarity index 95% rename from server/src/main/kotlin/suwayomi/anime/impl/Episode.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/impl/Episode.kt index 62e5140..00152b9 100644 --- a/server/src/main/kotlin/suwayomi/anime/impl/Episode.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/Episode.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.impl +package suwayomi.tachidesk.anime.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -16,13 +16,13 @@ import org.jetbrains.exposed.sql.insert import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.update -import suwayomi.anime.impl.Anime.getAnime -import suwayomi.anime.impl.util.GetAnimeHttpSource.getAnimeHttpSource -import suwayomi.anime.model.dataclass.EpisodeDataClass -import suwayomi.anime.model.table.AnimeTable -import suwayomi.anime.model.table.EpisodeTable -import suwayomi.anime.model.table.toDataClass -import suwayomi.tachidesk.impl.util.lang.awaitSingle +import suwayomi.tachidesk.anime.impl.Anime.getAnime +import suwayomi.tachidesk.anime.impl.util.GetAnimeHttpSource.getAnimeHttpSource +import suwayomi.tachidesk.anime.model.dataclass.EpisodeDataClass +import suwayomi.tachidesk.anime.model.table.AnimeTable +import suwayomi.tachidesk.anime.model.table.EpisodeTable +import suwayomi.tachidesk.anime.model.table.toDataClass +import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle object Episode { /** get episode list when showing an anime */ diff --git a/server/src/main/kotlin/suwayomi/anime/impl/Source.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/Source.kt similarity index 81% rename from server/src/main/kotlin/suwayomi/anime/impl/Source.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/impl/Source.kt index 8fd409e..63e8266 100644 --- a/server/src/main/kotlin/suwayomi/anime/impl/Source.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/Source.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.impl +package suwayomi.tachidesk.anime.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -11,11 +11,11 @@ import mu.KotlinLogging import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.selectAll import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.anime.impl.extension.Extension.getExtensionIconUrl -import suwayomi.anime.impl.util.GetAnimeHttpSource.getAnimeHttpSource -import suwayomi.anime.model.dataclass.AnimeSourceDataClass -import suwayomi.anime.model.table.AnimeExtensionTable -import suwayomi.anime.model.table.AnimeSourceTable +import suwayomi.tachidesk.anime.impl.extension.Extension.getExtensionIconUrl +import suwayomi.tachidesk.anime.impl.util.GetAnimeHttpSource.getAnimeHttpSource +import suwayomi.tachidesk.anime.model.dataclass.AnimeSourceDataClass +import suwayomi.tachidesk.anime.model.table.AnimeExtensionTable +import suwayomi.tachidesk.anime.model.table.AnimeSourceTable object Source { private val logger = KotlinLogging.logger {} diff --git a/server/src/main/kotlin/suwayomi/anime/impl/extension/Extension.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/extension/Extension.kt similarity index 88% rename from server/src/main/kotlin/suwayomi/anime/impl/extension/Extension.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/impl/extension/Extension.kt index 0b35a8a..df3fa39 100644 --- a/server/src/main/kotlin/suwayomi/anime/impl/extension/Extension.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/extension/Extension.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.impl.extension +package suwayomi.tachidesk.anime.impl.extension /* * Copyright (C) Contributors to the Suwayomi project @@ -25,23 +25,23 @@ import org.jetbrains.exposed.sql.update import org.kodein.di.DI import org.kodein.di.conf.global import org.kodein.di.instance -import suwayomi.anime.impl.extension.ExtensionsList.extensionTableAsDataClass -import suwayomi.anime.impl.extension.github.ExtensionGithubApi -import suwayomi.anime.impl.util.PackageTools.EXTENSION_FEATURE -import suwayomi.anime.impl.util.PackageTools.LIB_VERSION_MAX -import suwayomi.anime.impl.util.PackageTools.LIB_VERSION_MIN -import suwayomi.anime.impl.util.PackageTools.METADATA_NSFW -import suwayomi.anime.impl.util.PackageTools.METADATA_SOURCE_CLASS -import suwayomi.anime.impl.util.PackageTools.dex2jar -import suwayomi.anime.impl.util.PackageTools.getPackageInfo -import suwayomi.anime.impl.util.PackageTools.getSignatureHash -import suwayomi.anime.impl.util.PackageTools.loadExtensionSources -import suwayomi.anime.impl.util.PackageTools.trustedSignatures -import suwayomi.anime.model.table.AnimeExtensionTable -import suwayomi.anime.model.table.AnimeSourceTable -import suwayomi.server.ApplicationDirs -import suwayomi.tachidesk.impl.util.network.await -import suwayomi.tachidesk.impl.util.storage.CachedImageResponse.getCachedImageResponse +import suwayomi.tachidesk.anime.impl.extension.ExtensionsList.extensionTableAsDataClass +import suwayomi.tachidesk.anime.impl.extension.github.ExtensionGithubApi +import suwayomi.tachidesk.anime.impl.util.PackageTools.EXTENSION_FEATURE +import suwayomi.tachidesk.anime.impl.util.PackageTools.LIB_VERSION_MAX +import suwayomi.tachidesk.anime.impl.util.PackageTools.LIB_VERSION_MIN +import suwayomi.tachidesk.anime.impl.util.PackageTools.METADATA_NSFW +import suwayomi.tachidesk.anime.impl.util.PackageTools.METADATA_SOURCE_CLASS +import suwayomi.tachidesk.anime.impl.util.PackageTools.dex2jar +import suwayomi.tachidesk.anime.impl.util.PackageTools.getPackageInfo +import suwayomi.tachidesk.anime.impl.util.PackageTools.getSignatureHash +import suwayomi.tachidesk.anime.impl.util.PackageTools.loadExtensionSources +import suwayomi.tachidesk.anime.impl.util.PackageTools.trustedSignatures +import suwayomi.tachidesk.anime.model.table.AnimeExtensionTable +import suwayomi.tachidesk.anime.model.table.AnimeSourceTable +import suwayomi.tachidesk.server.ApplicationDirs +import suwayomi.tachidesk.manga.impl.util.network.await +import suwayomi.tachidesk.manga.impl.util.storage.CachedImageResponse.getCachedImageResponse import uy.kohesive.injekt.injectLazy import java.io.File import java.io.InputStream diff --git a/server/src/main/kotlin/suwayomi/anime/impl/extension/ExtensionsList.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/extension/ExtensionsList.kt similarity index 93% rename from server/src/main/kotlin/suwayomi/anime/impl/extension/ExtensionsList.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/impl/extension/ExtensionsList.kt index bc6a46d..d6686e4 100644 --- a/server/src/main/kotlin/suwayomi/anime/impl/extension/ExtensionsList.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/extension/ExtensionsList.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.impl.extension +package suwayomi.tachidesk.anime.impl.extension /* * Copyright (C) Contributors to the Suwayomi project @@ -14,11 +14,11 @@ import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.selectAll import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.update -import suwayomi.anime.impl.extension.Extension.getExtensionIconUrl -import suwayomi.anime.impl.extension.github.ExtensionGithubApi -import suwayomi.anime.impl.extension.github.OnlineExtension -import suwayomi.anime.model.dataclass.AnimeExtensionDataClass -import suwayomi.anime.model.table.AnimeExtensionTable +import suwayomi.tachidesk.anime.impl.extension.Extension.getExtensionIconUrl +import suwayomi.tachidesk.anime.impl.extension.github.ExtensionGithubApi +import suwayomi.tachidesk.anime.impl.extension.github.OnlineExtension +import suwayomi.tachidesk.anime.model.dataclass.AnimeExtensionDataClass +import suwayomi.tachidesk.anime.model.table.AnimeExtensionTable import java.util.concurrent.ConcurrentHashMap object ExtensionsList { diff --git a/server/src/main/kotlin/suwayomi/anime/impl/extension/github/ExtensionGithubApi.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/extension/github/ExtensionGithubApi.kt similarity index 89% rename from server/src/main/kotlin/suwayomi/anime/impl/extension/github/ExtensionGithubApi.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/impl/extension/github/ExtensionGithubApi.kt index 043a821..452dba2 100644 --- a/server/src/main/kotlin/suwayomi/anime/impl/extension/github/ExtensionGithubApi.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/extension/github/ExtensionGithubApi.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.impl.extension.github +package suwayomi.tachidesk.anime.impl.extension.github /* * Copyright (C) Contributors to the Suwayomi project @@ -13,10 +13,10 @@ import com.google.gson.JsonArray import com.google.gson.JsonParser import eu.kanade.tachiyomi.network.NetworkHelper import okhttp3.Request -import suwayomi.anime.impl.util.PackageTools.LIB_VERSION_MAX -import suwayomi.anime.impl.util.PackageTools.LIB_VERSION_MIN -import suwayomi.anime.model.dataclass.AnimeExtensionDataClass -import suwayomi.tachidesk.impl.util.network.UnzippingInterceptor +import suwayomi.tachidesk.anime.impl.util.PackageTools.LIB_VERSION_MAX +import suwayomi.tachidesk.anime.impl.util.PackageTools.LIB_VERSION_MIN +import suwayomi.tachidesk.anime.model.dataclass.AnimeExtensionDataClass +import suwayomi.tachidesk.manga.impl.util.network.UnzippingInterceptor import uy.kohesive.injekt.injectLazy object ExtensionGithubApi { diff --git a/server/src/main/kotlin/suwayomi/anime/impl/extension/github/OnlineExtension.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/extension/github/OnlineExtension.kt similarity index 90% rename from server/src/main/kotlin/suwayomi/anime/impl/extension/github/OnlineExtension.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/impl/extension/github/OnlineExtension.kt index da9dc6f..5947976 100644 --- a/server/src/main/kotlin/suwayomi/anime/impl/extension/github/OnlineExtension.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/extension/github/OnlineExtension.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.impl.extension.github +package suwayomi.tachidesk.anime.impl.extension.github /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/anime/impl/util/GetAnimeHttpSource.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/util/GetAnimeHttpSource.kt similarity index 87% rename from server/src/main/kotlin/suwayomi/anime/impl/util/GetAnimeHttpSource.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/impl/util/GetAnimeHttpSource.kt index f3bf58e..a7d5b10 100644 --- a/server/src/main/kotlin/suwayomi/anime/impl/util/GetAnimeHttpSource.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/util/GetAnimeHttpSource.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.impl.util +package suwayomi.tachidesk.anime.impl.util /* * Copyright (C) Contributors to the Suwayomi project @@ -15,10 +15,10 @@ import org.jetbrains.exposed.sql.transactions.transaction import org.kodein.di.DI import org.kodein.di.conf.global import org.kodein.di.instance -import suwayomi.anime.impl.util.PackageTools.loadExtensionSources -import suwayomi.anime.model.table.AnimeExtensionTable -import suwayomi.anime.model.table.AnimeSourceTable -import suwayomi.server.ApplicationDirs +import suwayomi.tachidesk.anime.impl.util.PackageTools.loadExtensionSources +import suwayomi.tachidesk.anime.model.table.AnimeExtensionTable +import suwayomi.tachidesk.anime.model.table.AnimeSourceTable +import suwayomi.tachidesk.server.ApplicationDirs import java.util.concurrent.ConcurrentHashMap object GetAnimeHttpSource { diff --git a/server/src/main/kotlin/suwayomi/anime/impl/util/PackageTools.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/util/PackageTools.kt similarity index 98% rename from server/src/main/kotlin/suwayomi/anime/impl/util/PackageTools.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/impl/util/PackageTools.kt index 01bf36a..8bdf709 100644 --- a/server/src/main/kotlin/suwayomi/anime/impl/util/PackageTools.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/impl/util/PackageTools.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.impl.util +package suwayomi.tachidesk.anime.impl.util /* * Copyright (C) Contributors to the Suwayomi project @@ -22,7 +22,7 @@ import org.kodein.di.conf.global import org.kodein.di.instance import org.w3c.dom.Element import org.w3c.dom.Node -import suwayomi.server.ApplicationDirs +import suwayomi.tachidesk.server.ApplicationDirs import xyz.nulldev.androidcompat.pm.InstalledPackage.Companion.toList import xyz.nulldev.androidcompat.pm.toPackageInfo import java.io.File diff --git a/server/src/main/kotlin/suwayomi/anime/model/dataclass/AnimeDataClass.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/dataclass/AnimeDataClass.kt similarity index 89% rename from server/src/main/kotlin/suwayomi/anime/model/dataclass/AnimeDataClass.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/model/dataclass/AnimeDataClass.kt index 0b86539..7dfcebe 100644 --- a/server/src/main/kotlin/suwayomi/anime/model/dataclass/AnimeDataClass.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/dataclass/AnimeDataClass.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.model.dataclass +package suwayomi.tachidesk.anime.model.dataclass /* * Copyright (C) Contributors to the Suwayomi project @@ -7,7 +7,7 @@ package suwayomi.anime.model.dataclass * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import suwayomi.anime.model.table.AnimeStatus +import suwayomi.tachidesk.anime.model.table.AnimeStatus data class AnimeDataClass( val id: Int, diff --git a/server/src/main/kotlin/suwayomi/anime/model/dataclass/AnimeExtensionDataClass.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/dataclass/AnimeExtensionDataClass.kt similarity index 92% rename from server/src/main/kotlin/suwayomi/anime/model/dataclass/AnimeExtensionDataClass.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/model/dataclass/AnimeExtensionDataClass.kt index ffbd8bb..c8b2839 100644 --- a/server/src/main/kotlin/suwayomi/anime/model/dataclass/AnimeExtensionDataClass.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/dataclass/AnimeExtensionDataClass.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.model.dataclass +package suwayomi.tachidesk.anime.model.dataclass /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/anime/model/dataclass/AnimeSourceDataClass.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/dataclass/AnimeSourceDataClass.kt similarity index 89% rename from server/src/main/kotlin/suwayomi/anime/model/dataclass/AnimeSourceDataClass.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/model/dataclass/AnimeSourceDataClass.kt index 8a207e2..5403601 100644 --- a/server/src/main/kotlin/suwayomi/anime/model/dataclass/AnimeSourceDataClass.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/dataclass/AnimeSourceDataClass.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.model.dataclass +package suwayomi.tachidesk.anime.model.dataclass /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/anime/model/dataclass/EpisodeDataClass.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/dataclass/EpisodeDataClass.kt similarity index 94% rename from server/src/main/kotlin/suwayomi/anime/model/dataclass/EpisodeDataClass.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/model/dataclass/EpisodeDataClass.kt index 9c7af94..91f9718 100644 --- a/server/src/main/kotlin/suwayomi/anime/model/dataclass/EpisodeDataClass.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/dataclass/EpisodeDataClass.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.model.dataclass +package suwayomi.tachidesk.anime.model.dataclass /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/anime/model/table/AnimeExtensionTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/table/AnimeExtensionTable.kt similarity index 96% rename from server/src/main/kotlin/suwayomi/anime/model/table/AnimeExtensionTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/model/table/AnimeExtensionTable.kt index 36983e6..6ccd8a5 100644 --- a/server/src/main/kotlin/suwayomi/anime/model/table/AnimeExtensionTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/table/AnimeExtensionTable.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.model.table +package suwayomi.tachidesk.anime.model.table /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/anime/model/table/AnimeSourceTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/table/AnimeSourceTable.kt similarity index 93% rename from server/src/main/kotlin/suwayomi/anime/model/table/AnimeSourceTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/model/table/AnimeSourceTable.kt index ba435d3..77238a4 100644 --- a/server/src/main/kotlin/suwayomi/anime/model/table/AnimeSourceTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/table/AnimeSourceTable.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.model.table +package suwayomi.tachidesk.anime.model.table /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/anime/model/table/AnimeTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/table/AnimeTable.kt similarity index 88% rename from server/src/main/kotlin/suwayomi/anime/model/table/AnimeTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/model/table/AnimeTable.kt index fbfd7a2..c6018d6 100644 --- a/server/src/main/kotlin/suwayomi/anime/model/table/AnimeTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/table/AnimeTable.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.model.table +package suwayomi.tachidesk.anime.model.table /* * Copyright (C) Contributors to the Suwayomi project @@ -10,9 +10,9 @@ package suwayomi.anime.model.table import eu.kanade.tachiyomi.animesource.model.SAnime import org.jetbrains.exposed.dao.id.IntIdTable import org.jetbrains.exposed.sql.ResultRow -import suwayomi.tachidesk.impl.MangaList.proxyThumbnailUrl -import suwayomi.tachidesk.model.dataclass.MangaDataClass -import suwayomi.tachidesk.model.table.MangaStatus.Companion +import suwayomi.tachidesk.manga.impl.MangaList.proxyThumbnailUrl +import suwayomi.tachidesk.manga.model.dataclass.MangaDataClass +import suwayomi.tachidesk.manga.model.table.MangaStatus.Companion object AnimeTable : IntIdTable() { val url = varchar("url", 2048) diff --git a/server/src/main/kotlin/suwayomi/anime/model/table/EpisodeTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/table/EpisodeTable.kt similarity index 93% rename from server/src/main/kotlin/suwayomi/anime/model/table/EpisodeTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/anime/model/table/EpisodeTable.kt index 4713ac1..ea8a404 100644 --- a/server/src/main/kotlin/suwayomi/anime/model/table/EpisodeTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/anime/model/table/EpisodeTable.kt @@ -1,4 +1,4 @@ -package suwayomi.anime.model.table +package suwayomi.tachidesk.anime.model.table /* * Copyright (C) Contributors to the Suwayomi project @@ -11,7 +11,7 @@ import org.jetbrains.exposed.dao.id.IntIdTable import org.jetbrains.exposed.sql.ResultRow import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.anime.model.dataclass.EpisodeDataClass +import suwayomi.tachidesk.anime.model.dataclass.EpisodeDataClass object EpisodeTable : IntIdTable() { val url = varchar("url", 2048) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/models/DHistory.kt b/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/models/DHistory.kt deleted file mode 100644 index ffb1ca6..0000000 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/models/DHistory.kt +++ /dev/null @@ -1,3 +0,0 @@ -package suwayomi.tachidesk.impl.backup.legacy.models - -data class DHistory(val url: String, val lastRead: Long) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/TachideskAPI.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/TachideskAPI.kt similarity index 87% rename from server/src/main/kotlin/suwayomi/tachidesk/TachideskAPI.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/TachideskAPI.kt index b7d32b5..8c28db2 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/TachideskAPI.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/TachideskAPI.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk +package suwayomi.tachidesk.manga /* * Copyright (C) Contributors to the Suwayomi project @@ -8,39 +8,39 @@ package suwayomi.tachidesk * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import io.javalin.Javalin -import suwayomi.server.JavalinSetup.future -import suwayomi.server.impl.About -import suwayomi.tachidesk.impl.Category -import suwayomi.tachidesk.impl.CategoryManga.addMangaToCategory -import suwayomi.tachidesk.impl.CategoryManga.getCategoryMangaList -import suwayomi.tachidesk.impl.CategoryManga.getMangaCategories -import suwayomi.tachidesk.impl.CategoryManga.removeMangaFromCategory -import suwayomi.tachidesk.impl.Chapter.getChapter -import suwayomi.tachidesk.impl.Chapter.getChapterList -import suwayomi.tachidesk.impl.Chapter.modifyChapter -import suwayomi.tachidesk.impl.Chapter.modifyChapterMeta -import suwayomi.tachidesk.impl.Library.addMangaToLibrary -import suwayomi.tachidesk.impl.Library.getLibraryMangas -import suwayomi.tachidesk.impl.Library.removeMangaFromLibrary -import suwayomi.tachidesk.impl.Manga.getManga -import suwayomi.tachidesk.impl.Manga.getMangaThumbnail -import suwayomi.tachidesk.impl.Manga.modifyMangaMeta -import suwayomi.tachidesk.impl.MangaList.getMangaList -import suwayomi.tachidesk.impl.Page.getPageImage -import suwayomi.tachidesk.impl.Search.sourceFilters -import suwayomi.tachidesk.impl.Search.sourceGlobalSearch -import suwayomi.tachidesk.impl.Search.sourceSearch -import suwayomi.tachidesk.impl.Source.getSource -import suwayomi.tachidesk.impl.Source.getSourceList -import suwayomi.tachidesk.impl.backup.BackupFlags -import suwayomi.tachidesk.impl.backup.legacy.LegacyBackupExport.createLegacyBackup -import suwayomi.tachidesk.impl.backup.legacy.LegacyBackupImport.restoreLegacyBackup -import suwayomi.tachidesk.impl.download.DownloadManager -import suwayomi.tachidesk.impl.extension.Extension.getExtensionIcon -import suwayomi.tachidesk.impl.extension.Extension.installExtension -import suwayomi.tachidesk.impl.extension.Extension.uninstallExtension -import suwayomi.tachidesk.impl.extension.Extension.updateExtension -import suwayomi.tachidesk.impl.extension.ExtensionsList.getExtensionList +import suwayomi.tachidesk.server.JavalinSetup.future +import suwayomi.tachidesk.server.impl.About +import suwayomi.tachidesk.manga.impl.Category +import suwayomi.tachidesk.manga.impl.CategoryManga.addMangaToCategory +import suwayomi.tachidesk.manga.impl.CategoryManga.getCategoryMangaList +import suwayomi.tachidesk.manga.impl.CategoryManga.getMangaCategories +import suwayomi.tachidesk.manga.impl.CategoryManga.removeMangaFromCategory +import suwayomi.tachidesk.manga.impl.Chapter.getChapter +import suwayomi.tachidesk.manga.impl.Chapter.getChapterList +import suwayomi.tachidesk.manga.impl.Chapter.modifyChapter +import suwayomi.tachidesk.manga.impl.Chapter.modifyChapterMeta +import suwayomi.tachidesk.manga.impl.Library.addMangaToLibrary +import suwayomi.tachidesk.manga.impl.Library.getLibraryMangas +import suwayomi.tachidesk.manga.impl.Library.removeMangaFromLibrary +import suwayomi.tachidesk.manga.impl.Manga.getManga +import suwayomi.tachidesk.manga.impl.Manga.getMangaThumbnail +import suwayomi.tachidesk.manga.impl.Manga.modifyMangaMeta +import suwayomi.tachidesk.manga.impl.MangaList.getMangaList +import suwayomi.tachidesk.manga.impl.Page.getPageImage +import suwayomi.tachidesk.manga.impl.Search.sourceFilters +import suwayomi.tachidesk.manga.impl.Search.sourceGlobalSearch +import suwayomi.tachidesk.manga.impl.Search.sourceSearch +import suwayomi.tachidesk.manga.impl.Source.getSource +import suwayomi.tachidesk.manga.impl.Source.getSourceList +import suwayomi.tachidesk.manga.impl.backup.BackupFlags +import suwayomi.tachidesk.manga.impl.backup.legacy.LegacyBackupExport.createLegacyBackup +import suwayomi.tachidesk.manga.impl.backup.legacy.LegacyBackupImport.restoreLegacyBackup +import suwayomi.tachidesk.manga.impl.download.DownloadManager +import suwayomi.tachidesk.manga.impl.extension.Extension.getExtensionIcon +import suwayomi.tachidesk.manga.impl.extension.Extension.installExtension +import suwayomi.tachidesk.manga.impl.extension.Extension.uninstallExtension +import suwayomi.tachidesk.manga.impl.extension.Extension.updateExtension +import suwayomi.tachidesk.manga.impl.extension.ExtensionsList.getExtensionList import java.text.SimpleDateFormat import java.util.Date diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/Category.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Category.kt similarity index 87% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/Category.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Category.kt index c242692..eacfb8f 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/Category.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Category.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl +package suwayomi.tachidesk.manga.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -14,11 +14,11 @@ import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.selectAll import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.update -import suwayomi.tachidesk.impl.CategoryManga.removeMangaFromCategory -import suwayomi.tachidesk.model.dataclass.CategoryDataClass -import suwayomi.tachidesk.model.table.CategoryMangaTable -import suwayomi.tachidesk.model.table.CategoryTable -import suwayomi.tachidesk.model.table.toDataClass +import suwayomi.tachidesk.manga.impl.CategoryManga.removeMangaFromCategory +import suwayomi.tachidesk.manga.model.dataclass.CategoryDataClass +import suwayomi.tachidesk.manga.model.table.CategoryMangaTable +import suwayomi.tachidesk.manga.model.table.CategoryTable +import suwayomi.tachidesk.manga.model.table.toDataClass object Category { /** diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/CategoryManga.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/CategoryManga.kt similarity index 85% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/CategoryManga.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/CategoryManga.kt index 48a08ab..f1142c6 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/CategoryManga.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/CategoryManga.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl +package suwayomi.tachidesk.manga.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -14,12 +14,12 @@ import org.jetbrains.exposed.sql.insert import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.update -import suwayomi.tachidesk.model.dataclass.CategoryDataClass -import suwayomi.tachidesk.model.dataclass.MangaDataClass -import suwayomi.tachidesk.model.table.CategoryMangaTable -import suwayomi.tachidesk.model.table.CategoryTable -import suwayomi.tachidesk.model.table.MangaTable -import suwayomi.tachidesk.model.table.toDataClass +import suwayomi.tachidesk.manga.model.dataclass.CategoryDataClass +import suwayomi.tachidesk.manga.model.dataclass.MangaDataClass +import suwayomi.tachidesk.manga.model.table.CategoryMangaTable +import suwayomi.tachidesk.manga.model.table.CategoryTable +import suwayomi.tachidesk.manga.model.table.MangaTable +import suwayomi.tachidesk.manga.model.table.toDataClass object CategoryManga { fun addMangaToCategory(mangaId: Int, categoryId: Int) { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/Chapter.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Chapter.kt similarity index 94% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/Chapter.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Chapter.kt index ea31205..48f6f9c 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/Chapter.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Chapter.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl +package suwayomi.tachidesk.manga.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -17,15 +17,15 @@ import org.jetbrains.exposed.sql.insert import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.update -import suwayomi.tachidesk.impl.Manga.getManga -import suwayomi.tachidesk.impl.util.GetHttpSource.getHttpSource -import suwayomi.tachidesk.impl.util.lang.awaitSingle -import suwayomi.tachidesk.model.dataclass.ChapterDataClass -import suwayomi.tachidesk.model.table.ChapterMetaTable -import suwayomi.tachidesk.model.table.ChapterTable -import suwayomi.tachidesk.model.table.MangaTable -import suwayomi.tachidesk.model.table.PageTable -import suwayomi.tachidesk.model.table.toDataClass +import suwayomi.tachidesk.manga.impl.Manga.getManga +import suwayomi.tachidesk.manga.impl.util.GetHttpSource.getHttpSource +import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle +import suwayomi.tachidesk.manga.model.dataclass.ChapterDataClass +import suwayomi.tachidesk.manga.model.table.ChapterMetaTable +import suwayomi.tachidesk.manga.model.table.ChapterTable +import suwayomi.tachidesk.manga.model.table.MangaTable +import suwayomi.tachidesk.manga.model.table.PageTable +import suwayomi.tachidesk.manga.model.table.toDataClass import java.time.Instant object Chapter { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/Library.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Library.kt similarity index 85% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/Library.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Library.kt index 2c03f33..ff1ec16 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/Library.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Library.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl +package suwayomi.tachidesk.manga.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -13,12 +13,12 @@ import org.jetbrains.exposed.sql.insert import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.update -import suwayomi.tachidesk.impl.Manga.getManga -import suwayomi.tachidesk.model.dataclass.MangaDataClass -import suwayomi.tachidesk.model.table.CategoryMangaTable -import suwayomi.tachidesk.model.table.CategoryTable -import suwayomi.tachidesk.model.table.MangaTable -import suwayomi.tachidesk.model.table.toDataClass +import suwayomi.tachidesk.manga.impl.Manga.getManga +import suwayomi.tachidesk.manga.model.dataclass.MangaDataClass +import suwayomi.tachidesk.manga.model.table.CategoryMangaTable +import suwayomi.tachidesk.manga.model.table.CategoryTable +import suwayomi.tachidesk.manga.model.table.MangaTable +import suwayomi.tachidesk.manga.model.table.toDataClass object Library { // TODO: `Category.isLanding` is to handle the default categories a new library manga gets, diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/Manga.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Manga.kt similarity index 88% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/Manga.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Manga.kt index 9e7c953..961b840 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/Manga.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Manga.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl +package suwayomi.tachidesk.manga.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -18,18 +18,18 @@ import org.jetbrains.exposed.sql.update import org.kodein.di.DI import org.kodein.di.conf.global import org.kodein.di.instance -import suwayomi.server.ApplicationDirs -import suwayomi.tachidesk.impl.MangaList.proxyThumbnailUrl -import suwayomi.tachidesk.impl.Source.getSource -import suwayomi.tachidesk.impl.util.GetHttpSource.getHttpSource -import suwayomi.tachidesk.impl.util.lang.awaitSingle -import suwayomi.tachidesk.impl.util.network.await -import suwayomi.tachidesk.impl.util.storage.CachedImageResponse.clearCachedImage -import suwayomi.tachidesk.impl.util.storage.CachedImageResponse.getCachedImageResponse -import suwayomi.tachidesk.model.dataclass.MangaDataClass -import suwayomi.tachidesk.model.table.MangaMetaTable -import suwayomi.tachidesk.model.table.MangaStatus -import suwayomi.tachidesk.model.table.MangaTable +import suwayomi.tachidesk.server.ApplicationDirs +import suwayomi.tachidesk.manga.impl.MangaList.proxyThumbnailUrl +import suwayomi.tachidesk.manga.impl.Source.getSource +import suwayomi.tachidesk.manga.impl.util.GetHttpSource.getHttpSource +import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle +import suwayomi.tachidesk.manga.impl.util.network.await +import suwayomi.tachidesk.manga.impl.util.storage.CachedImageResponse.clearCachedImage +import suwayomi.tachidesk.manga.impl.util.storage.CachedImageResponse.getCachedImageResponse +import suwayomi.tachidesk.manga.model.dataclass.MangaDataClass +import suwayomi.tachidesk.manga.model.table.MangaMetaTable +import suwayomi.tachidesk.manga.model.table.MangaStatus +import suwayomi.tachidesk.manga.model.table.MangaTable import java.io.InputStream object Manga { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/MangaList.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/MangaList.kt similarity index 88% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/MangaList.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/MangaList.kt index cb8e28d..9ffa3e1 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/MangaList.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/MangaList.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl +package suwayomi.tachidesk.manga.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -11,13 +11,13 @@ import eu.kanade.tachiyomi.source.model.MangasPage import org.jetbrains.exposed.sql.insertAndGetId import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.tachidesk.impl.Manga.getMangaMetaMap -import suwayomi.tachidesk.impl.util.GetHttpSource.getHttpSource -import suwayomi.tachidesk.impl.util.lang.awaitSingle -import suwayomi.tachidesk.model.dataclass.MangaDataClass -import suwayomi.tachidesk.model.dataclass.PagedMangaListDataClass -import suwayomi.tachidesk.model.table.MangaStatus -import suwayomi.tachidesk.model.table.MangaTable +import suwayomi.tachidesk.manga.impl.Manga.getMangaMetaMap +import suwayomi.tachidesk.manga.impl.util.GetHttpSource.getHttpSource +import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle +import suwayomi.tachidesk.manga.model.dataclass.MangaDataClass +import suwayomi.tachidesk.manga.model.dataclass.PagedMangaListDataClass +import suwayomi.tachidesk.manga.model.table.MangaStatus +import suwayomi.tachidesk.manga.model.table.MangaTable object MangaList { fun proxyThumbnailUrl(mangaId: Int): String { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/Page.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Page.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/Page.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Page.kt index 8a24988..3ac698b 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/Page.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Page.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl +package suwayomi.tachidesk.manga.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -16,14 +16,14 @@ import org.jetbrains.exposed.sql.update import org.kodein.di.DI import org.kodein.di.conf.global import org.kodein.di.instance -import suwayomi.server.ApplicationDirs -import suwayomi.tachidesk.impl.util.GetHttpSource.getHttpSource -import suwayomi.tachidesk.impl.util.lang.awaitSingle -import suwayomi.tachidesk.impl.util.storage.CachedImageResponse.getCachedImageResponse -import suwayomi.tachidesk.impl.util.storage.SafePath -import suwayomi.tachidesk.model.table.ChapterTable -import suwayomi.tachidesk.model.table.MangaTable -import suwayomi.tachidesk.model.table.PageTable +import suwayomi.tachidesk.server.ApplicationDirs +import suwayomi.tachidesk.manga.impl.util.GetHttpSource.getHttpSource +import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle +import suwayomi.tachidesk.manga.impl.util.storage.CachedImageResponse.getCachedImageResponse +import suwayomi.tachidesk.manga.impl.util.storage.SafePath +import suwayomi.tachidesk.manga.model.table.ChapterTable +import suwayomi.tachidesk.manga.model.table.MangaTable +import suwayomi.tachidesk.manga.model.table.PageTable import java.io.File import java.io.InputStream diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/Search.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Search.kt similarity index 89% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/Search.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Search.kt index 7d62892..c36436f 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/Search.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Search.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl +package suwayomi.tachidesk.manga.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -7,10 +7,10 @@ package suwayomi.tachidesk.impl * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import suwayomi.tachidesk.impl.MangaList.processEntries -import suwayomi.tachidesk.impl.util.GetHttpSource.getHttpSource -import suwayomi.tachidesk.impl.util.lang.awaitSingle -import suwayomi.tachidesk.model.dataclass.PagedMangaListDataClass +import suwayomi.tachidesk.manga.impl.MangaList.processEntries +import suwayomi.tachidesk.manga.impl.util.GetHttpSource.getHttpSource +import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle +import suwayomi.tachidesk.manga.model.dataclass.PagedMangaListDataClass object Search { // TODO diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/Source.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Source.kt similarity index 81% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/Source.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Source.kt index 4c1d43d..7f8373d 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/Source.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Source.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl +package suwayomi.tachidesk.manga.impl /* * Copyright (C) Contributors to the Suwayomi project @@ -11,11 +11,11 @@ import mu.KotlinLogging import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.selectAll import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.tachidesk.impl.extension.Extension.getExtensionIconUrl -import suwayomi.tachidesk.impl.util.GetHttpSource.getHttpSource -import suwayomi.tachidesk.model.dataclass.SourceDataClass -import suwayomi.tachidesk.model.table.ExtensionTable -import suwayomi.tachidesk.model.table.SourceTable +import suwayomi.tachidesk.manga.impl.extension.Extension.getExtensionIconUrl +import suwayomi.tachidesk.manga.impl.util.GetHttpSource.getHttpSource +import suwayomi.tachidesk.manga.model.dataclass.SourceDataClass +import suwayomi.tachidesk.manga.model.table.ExtensionTable +import suwayomi.tachidesk.manga.model.table.SourceTable object Source { private val logger = KotlinLogging.logger {} diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/BackupFlags.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/BackupFlags.kt similarity index 91% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/BackupFlags.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/BackupFlags.kt index 66171bd..05c6954 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/BackupFlags.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/BackupFlags.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup +package suwayomi.tachidesk.manga.impl.backup /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/LegacyBackupBase.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/LegacyBackupBase.kt similarity index 61% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/LegacyBackupBase.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/LegacyBackupBase.kt index cf09ada..dfcfc6b 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/LegacyBackupBase.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/LegacyBackupBase.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.legacy +package suwayomi.tachidesk.manga.impl.backup.legacy /* * Copyright (C) Contributors to the Suwayomi project @@ -11,16 +11,16 @@ import com.github.salomonbrys.kotson.registerTypeAdapter import com.github.salomonbrys.kotson.registerTypeHierarchyAdapter import com.google.gson.Gson import com.google.gson.GsonBuilder -import suwayomi.tachidesk.impl.backup.legacy.models.DHistory -import suwayomi.tachidesk.impl.backup.legacy.serializer.CategoryTypeAdapter -import suwayomi.tachidesk.impl.backup.legacy.serializer.ChapterTypeAdapter -import suwayomi.tachidesk.impl.backup.legacy.serializer.HistoryTypeAdapter -import suwayomi.tachidesk.impl.backup.legacy.serializer.MangaTypeAdapter -import suwayomi.tachidesk.impl.backup.legacy.serializer.TrackTypeAdapter -import suwayomi.tachidesk.impl.backup.models.CategoryImpl -import suwayomi.tachidesk.impl.backup.models.ChapterImpl -import suwayomi.tachidesk.impl.backup.models.MangaImpl -import suwayomi.tachidesk.impl.backup.models.TrackImpl +import suwayomi.tachidesk.manga.impl.backup.legacy.models.DHistory +import suwayomi.tachidesk.manga.impl.backup.legacy.serializer.CategoryTypeAdapter +import suwayomi.tachidesk.manga.impl.backup.legacy.serializer.ChapterTypeAdapter +import suwayomi.tachidesk.manga.impl.backup.legacy.serializer.HistoryTypeAdapter +import suwayomi.tachidesk.manga.impl.backup.legacy.serializer.MangaTypeAdapter +import suwayomi.tachidesk.manga.impl.backup.legacy.serializer.TrackTypeAdapter +import suwayomi.tachidesk.manga.impl.backup.models.CategoryImpl +import suwayomi.tachidesk.manga.impl.backup.models.ChapterImpl +import suwayomi.tachidesk.manga.impl.backup.models.MangaImpl +import suwayomi.tachidesk.manga.impl.backup.models.TrackImpl import java.util.Date open class LegacyBackupBase { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/LegacyBackupExport.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/LegacyBackupExport.kt similarity index 85% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/LegacyBackupExport.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/LegacyBackupExport.kt index 3a0458c..454a40a 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/LegacyBackupExport.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/LegacyBackupExport.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.legacy +package suwayomi.tachidesk.manga.impl.backup.legacy /* * Copyright (C) Contributors to the Suwayomi project @@ -14,18 +14,18 @@ import com.google.gson.JsonObject import eu.kanade.tachiyomi.source.LocalSource import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.tachidesk.impl.Category.getCategoryList -import suwayomi.tachidesk.impl.CategoryManga.getMangaCategories -import suwayomi.tachidesk.impl.backup.BackupFlags -import suwayomi.tachidesk.impl.backup.legacy.models.Backup -import suwayomi.tachidesk.impl.backup.legacy.models.Backup.CURRENT_VERSION -import suwayomi.tachidesk.impl.backup.models.CategoryImpl -import suwayomi.tachidesk.impl.backup.models.ChapterImpl -import suwayomi.tachidesk.impl.backup.models.Manga -import suwayomi.tachidesk.impl.backup.models.MangaImpl -import suwayomi.tachidesk.impl.util.GetHttpSource.getHttpSource -import suwayomi.tachidesk.model.table.ChapterTable -import suwayomi.tachidesk.model.table.MangaTable +import suwayomi.tachidesk.manga.impl.Category.getCategoryList +import suwayomi.tachidesk.manga.impl.CategoryManga.getMangaCategories +import suwayomi.tachidesk.manga.impl.backup.BackupFlags +import suwayomi.tachidesk.manga.impl.backup.legacy.models.Backup +import suwayomi.tachidesk.manga.impl.backup.legacy.models.Backup.CURRENT_VERSION +import suwayomi.tachidesk.manga.impl.backup.models.CategoryImpl +import suwayomi.tachidesk.manga.impl.backup.models.ChapterImpl +import suwayomi.tachidesk.manga.impl.backup.models.Manga +import suwayomi.tachidesk.manga.impl.backup.models.MangaImpl +import suwayomi.tachidesk.manga.impl.util.GetHttpSource.getHttpSource +import suwayomi.tachidesk.manga.model.table.ChapterTable +import suwayomi.tachidesk.manga.model.table.MangaTable object LegacyBackupExport : LegacyBackupBase() { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/LegacyBackupImport.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/LegacyBackupImport.kt similarity index 85% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/LegacyBackupImport.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/LegacyBackupImport.kt index 4d525b0..9c98474 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/LegacyBackupImport.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/LegacyBackupImport.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.legacy +package suwayomi.tachidesk.manga.impl.backup.legacy import com.github.salomonbrys.kotson.fromJson import com.google.gson.JsonArray @@ -13,22 +13,22 @@ import org.jetbrains.exposed.sql.insert import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.update -import suwayomi.tachidesk.impl.Category.createCategory -import suwayomi.tachidesk.impl.Category.getCategoryList -import suwayomi.tachidesk.impl.backup.legacy.LegacyBackupValidator.ValidationResult -import suwayomi.tachidesk.impl.backup.legacy.LegacyBackupValidator.validate -import suwayomi.tachidesk.impl.backup.legacy.models.Backup -import suwayomi.tachidesk.impl.backup.legacy.models.DHistory -import suwayomi.tachidesk.impl.backup.models.CategoryImpl -import suwayomi.tachidesk.impl.backup.models.Chapter -import suwayomi.tachidesk.impl.backup.models.ChapterImpl -import suwayomi.tachidesk.impl.backup.models.Manga -import suwayomi.tachidesk.impl.backup.models.MangaImpl -import suwayomi.tachidesk.impl.backup.models.Track -import suwayomi.tachidesk.impl.backup.models.TrackImpl -import suwayomi.tachidesk.impl.util.GetHttpSource.getHttpSource -import suwayomi.tachidesk.impl.util.lang.awaitSingle -import suwayomi.tachidesk.model.table.MangaTable +import suwayomi.tachidesk.manga.impl.Category.createCategory +import suwayomi.tachidesk.manga.impl.Category.getCategoryList +import suwayomi.tachidesk.manga.impl.backup.legacy.LegacyBackupValidator.ValidationResult +import suwayomi.tachidesk.manga.impl.backup.legacy.LegacyBackupValidator.validate +import suwayomi.tachidesk.manga.impl.backup.legacy.models.Backup +import suwayomi.tachidesk.manga.impl.backup.legacy.models.DHistory +import suwayomi.tachidesk.manga.impl.backup.models.CategoryImpl +import suwayomi.tachidesk.manga.impl.backup.models.Chapter +import suwayomi.tachidesk.manga.impl.backup.models.ChapterImpl +import suwayomi.tachidesk.manga.impl.backup.models.Manga +import suwayomi.tachidesk.manga.impl.backup.models.MangaImpl +import suwayomi.tachidesk.manga.impl.backup.models.Track +import suwayomi.tachidesk.manga.impl.backup.models.TrackImpl +import suwayomi.tachidesk.manga.impl.util.GetHttpSource.getHttpSource +import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle +import suwayomi.tachidesk.manga.model.table.MangaTable import java.io.InputStream import java.util.Date diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/LegacyBackupValidator.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/LegacyBackupValidator.kt similarity index 93% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/LegacyBackupValidator.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/LegacyBackupValidator.kt index fc80905..e8036ac 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/LegacyBackupValidator.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/LegacyBackupValidator.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.legacy +package suwayomi.tachidesk.manga.impl.backup.legacy /* * Copyright (C) Contributors to the Suwayomi project @@ -10,8 +10,8 @@ package suwayomi.tachidesk.impl.backup.legacy import com.google.gson.JsonObject import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.tachidesk.impl.backup.legacy.models.Backup -import suwayomi.tachidesk.model.table.SourceTable +import suwayomi.tachidesk.manga.impl.backup.legacy.models.Backup +import suwayomi.tachidesk.manga.model.table.SourceTable object LegacyBackupValidator { data class ValidationResult(val missingSources: List, val missingTrackers: List) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/models/Backup.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/models/Backup.kt similarity index 91% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/models/Backup.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/models/Backup.kt index 9ec848d..2f58de8 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/models/Backup.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/models/Backup.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.legacy.models +package suwayomi.tachidesk.manga.impl.backup.legacy.models import java.text.SimpleDateFormat import java.util.Date diff --git a/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/models/DHistory.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/models/DHistory.kt new file mode 100644 index 0000000..6d91fbd --- /dev/null +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/models/DHistory.kt @@ -0,0 +1,3 @@ +package suwayomi.tachidesk.manga.impl.backup.legacy.models + +data class DHistory(val url: String, val lastRead: Long) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/CategoryTypeAdapter.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/CategoryTypeAdapter.kt similarity index 84% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/CategoryTypeAdapter.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/CategoryTypeAdapter.kt index de9d377..edd73f2 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/CategoryTypeAdapter.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/CategoryTypeAdapter.kt @@ -1,8 +1,8 @@ -package suwayomi.tachidesk.impl.backup.legacy.serializer +package suwayomi.tachidesk.manga.impl.backup.legacy.serializer import com.github.salomonbrys.kotson.typeAdapter import com.google.gson.TypeAdapter -import suwayomi.tachidesk.impl.backup.models.CategoryImpl +import suwayomi.tachidesk.manga.impl.backup.models.CategoryImpl /** * JSON Serializer used to write / read [CategoryImpl] to / from json diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/ChapterTypeAdapter.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/ChapterTypeAdapter.kt similarity index 93% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/ChapterTypeAdapter.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/ChapterTypeAdapter.kt index 202f8d0..a669db8 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/ChapterTypeAdapter.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/ChapterTypeAdapter.kt @@ -1,9 +1,9 @@ -package suwayomi.tachidesk.impl.backup.legacy.serializer +package suwayomi.tachidesk.manga.impl.backup.legacy.serializer import com.github.salomonbrys.kotson.typeAdapter import com.google.gson.TypeAdapter import com.google.gson.stream.JsonToken -import suwayomi.tachidesk.impl.backup.models.ChapterImpl +import suwayomi.tachidesk.manga.impl.backup.models.ChapterImpl /** * JSON Serializer used to write / read [ChapterImpl] to / from json diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/HistoryTypeAdapter.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/HistoryTypeAdapter.kt similarity index 84% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/HistoryTypeAdapter.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/HistoryTypeAdapter.kt index 91b78f7..b5cdd1d 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/HistoryTypeAdapter.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/HistoryTypeAdapter.kt @@ -1,8 +1,8 @@ -package suwayomi.tachidesk.impl.backup.legacy.serializer +package suwayomi.tachidesk.manga.impl.backup.legacy.serializer import com.github.salomonbrys.kotson.typeAdapter import com.google.gson.TypeAdapter -import suwayomi.tachidesk.impl.backup.legacy.models.DHistory +import suwayomi.tachidesk.manga.impl.backup.legacy.models.DHistory /** * JSON Serializer used to write / read [DHistory] to / from json diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/MangaTypeAdapter.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/MangaTypeAdapter.kt similarity index 87% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/MangaTypeAdapter.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/MangaTypeAdapter.kt index ccda807..dee9733 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/MangaTypeAdapter.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/MangaTypeAdapter.kt @@ -1,8 +1,8 @@ -package suwayomi.tachidesk.impl.backup.legacy.serializer +package suwayomi.tachidesk.manga.impl.backup.legacy.serializer import com.github.salomonbrys.kotson.typeAdapter import com.google.gson.TypeAdapter -import suwayomi.tachidesk.impl.backup.models.MangaImpl +import suwayomi.tachidesk.manga.impl.backup.models.MangaImpl /** * JSON Serializer used to write / read [MangaImpl] to / from json diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/TrackTypeAdapter.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/TrackTypeAdapter.kt similarity index 93% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/TrackTypeAdapter.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/TrackTypeAdapter.kt index f9254d4..c6053f6 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/legacy/serializer/TrackTypeAdapter.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/legacy/serializer/TrackTypeAdapter.kt @@ -1,9 +1,9 @@ -package suwayomi.tachidesk.impl.backup.legacy.serializer +package suwayomi.tachidesk.manga.impl.backup.legacy.serializer import com.github.salomonbrys.kotson.typeAdapter import com.google.gson.TypeAdapter import com.google.gson.stream.JsonToken -import suwayomi.tachidesk.impl.backup.models.TrackImpl +import suwayomi.tachidesk.manga.impl.backup.models.TrackImpl /** * JSON Serializer used to write / read [TrackImpl] to / from json diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/Category.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/Category.kt similarity index 87% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/Category.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/Category.kt index 8e1afa0..f4ece8d 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/Category.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/Category.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models import java.io.Serializable diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/CategoryImpl.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/CategoryImpl.kt similarity index 90% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/CategoryImpl.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/CategoryImpl.kt index fc07b2d..813c00d 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/CategoryImpl.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/CategoryImpl.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models class CategoryImpl : Category { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/Chapter.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/Chapter.kt similarity index 90% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/Chapter.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/Chapter.kt index 77d8198..f5f0a12 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/Chapter.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/Chapter.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models import eu.kanade.tachiyomi.source.model.SChapter import java.io.Serializable diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/ChapterImpl.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/ChapterImpl.kt similarity index 92% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/ChapterImpl.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/ChapterImpl.kt index 264413e..d30ba6b 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/ChapterImpl.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/ChapterImpl.kt @@ -1,7 +1,7 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models import org.jetbrains.exposed.sql.ResultRow -import suwayomi.tachidesk.model.table.ChapterTable +import suwayomi.tachidesk.manga.model.table.ChapterTable class ChapterImpl : Chapter { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/History.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/History.kt similarity index 93% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/History.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/History.kt index a3aa5d0..3c60b6b 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/History.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/History.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models import java.io.Serializable diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/HistoryImpl.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/HistoryImpl.kt similarity index 90% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/HistoryImpl.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/HistoryImpl.kt index 5caa1df..f0ee2ce 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/HistoryImpl.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/HistoryImpl.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models /** * Object containing the history statistics of a chapter diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/LibraryManga.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/LibraryManga.kt similarity index 63% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/LibraryManga.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/LibraryManga.kt index 84be436..c3ee863 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/LibraryManga.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/LibraryManga.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models class LibraryManga : MangaImpl() { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/Manga.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/Manga.kt similarity index 98% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/Manga.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/Manga.kt index a9b3f16..4d03501 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/Manga.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/Manga.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models import eu.kanade.tachiyomi.source.model.SManga diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/MangaCategory.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/MangaCategory.kt similarity index 87% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/MangaCategory.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/MangaCategory.kt index 34cfcbd..9afba35 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/MangaCategory.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/MangaCategory.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models class MangaCategory { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/MangaChapter.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/MangaChapter.kt similarity index 53% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/MangaChapter.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/MangaChapter.kt index 9ab3fe4..9afc27c 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/MangaChapter.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/MangaChapter.kt @@ -1,3 +1,3 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models class MangaChapter(val manga: Manga, val chapter: Chapter) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/MangaChapterHistory.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/MangaChapterHistory.kt similarity index 84% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/MangaChapterHistory.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/MangaChapterHistory.kt index 57b00dd..f93bfcf 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/MangaChapterHistory.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/MangaChapterHistory.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models /** * Object containing manga, chapter and history diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/MangaImpl.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/MangaImpl.kt similarity index 94% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/MangaImpl.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/MangaImpl.kt index 2c50f1f..8124cdd 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/MangaImpl.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/MangaImpl.kt @@ -1,7 +1,7 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models import org.jetbrains.exposed.sql.ResultRow -import suwayomi.tachidesk.model.table.MangaTable +import suwayomi.tachidesk.manga.model.table.MangaTable open class MangaImpl : Manga { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/Track.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/Track.kt similarity index 94% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/Track.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/Track.kt index 155054a..c9b9e15 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/Track.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/Track.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models import java.io.Serializable diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/TrackImpl.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/TrackImpl.kt similarity index 95% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/TrackImpl.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/TrackImpl.kt index 1a54030..84e035b 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/backup/models/TrackImpl.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/TrackImpl.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.backup.models +package suwayomi.tachidesk.manga.impl.backup.models class TrackImpl : Track { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/download/DownloadManager.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/DownloadManager.kt similarity index 90% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/download/DownloadManager.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/DownloadManager.kt index d415286..a7ede41 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/download/DownloadManager.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/DownloadManager.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.download +package suwayomi.tachidesk.manga.impl.download /* * Copyright (C) Contributors to the Suwayomi project @@ -12,11 +12,11 @@ import io.javalin.websocket.WsMessageContext import org.jetbrains.exposed.sql.and import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.tachidesk.impl.download.model.DownloadChapter -import suwayomi.tachidesk.impl.download.model.DownloadState.Downloading -import suwayomi.tachidesk.impl.download.model.DownloadStatus -import suwayomi.tachidesk.model.table.ChapterTable -import suwayomi.tachidesk.model.table.toDataClass +import suwayomi.tachidesk.manga.impl.download.model.DownloadChapter +import suwayomi.tachidesk.manga.impl.download.model.DownloadState.Downloading +import suwayomi.tachidesk.manga.impl.download.model.DownloadStatus +import suwayomi.tachidesk.manga.model.table.ChapterTable +import suwayomi.tachidesk.manga.model.table.toDataClass import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.CopyOnWriteArrayList diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/download/Downloader.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/Downloader.kt similarity index 83% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/download/Downloader.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/Downloader.kt index 07e192e..c58ff0e 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/download/Downloader.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/Downloader.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.download +package suwayomi.tachidesk.manga.impl.download /* * Copyright (C) Contributors to the Suwayomi project @@ -11,14 +11,14 @@ import kotlinx.coroutines.runBlocking import org.jetbrains.exposed.sql.and import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.update -import suwayomi.tachidesk.impl.Chapter.getChapter -import suwayomi.tachidesk.impl.Page.getPageImage -import suwayomi.tachidesk.impl.download.model.DownloadChapter -import suwayomi.tachidesk.impl.download.model.DownloadState.Downloading -import suwayomi.tachidesk.impl.download.model.DownloadState.Error -import suwayomi.tachidesk.impl.download.model.DownloadState.Finished -import suwayomi.tachidesk.impl.download.model.DownloadState.Queued -import suwayomi.tachidesk.model.table.ChapterTable +import suwayomi.tachidesk.manga.impl.Chapter.getChapter +import suwayomi.tachidesk.manga.impl.Page.getPageImage +import suwayomi.tachidesk.manga.impl.download.model.DownloadChapter +import suwayomi.tachidesk.manga.impl.download.model.DownloadState.Downloading +import suwayomi.tachidesk.manga.impl.download.model.DownloadState.Error +import suwayomi.tachidesk.manga.impl.download.model.DownloadState.Finished +import suwayomi.tachidesk.manga.impl.download.model.DownloadState.Queued +import suwayomi.tachidesk.manga.model.table.ChapterTable import java.util.concurrent.CopyOnWriteArrayList class Downloader(private val downloadQueue: CopyOnWriteArrayList, val notifier: () -> Unit) : Thread() { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/download/model/DownloadChapter.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/model/DownloadChapter.kt similarity index 65% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/download/model/DownloadChapter.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/model/DownloadChapter.kt index f7c9dd2..cce5559 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/download/model/DownloadChapter.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/model/DownloadChapter.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.download.model +package suwayomi.tachidesk.manga.impl.download.model /* * Copyright (C) Contributors to the Suwayomi project @@ -7,12 +7,13 @@ package suwayomi.tachidesk.impl.download.model * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import suwayomi.tachidesk.model.dataclass.ChapterDataClass +import suwayomi.tachidesk.manga.impl.download.model.DownloadState.Queued +import suwayomi.tachidesk.manga.model.dataclass.ChapterDataClass class DownloadChapter( val chapterIndex: Int, val mangaId: Int, - var state: DownloadState = DownloadState.Queued, + var state: DownloadState = Queued, var progress: Float = 0f, var tries: Int = 0, var chapter: ChapterDataClass? = null, diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/download/model/DownloadState.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/model/DownloadState.kt similarity index 87% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/download/model/DownloadState.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/model/DownloadState.kt index 89d453d..e0f83f1 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/download/model/DownloadState.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/model/DownloadState.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.download.model +package suwayomi.tachidesk.manga.impl.download.model /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/download/model/DownloadStatus.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/model/DownloadStatus.kt similarity index 87% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/download/model/DownloadStatus.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/model/DownloadStatus.kt index 1bf9e22..ba645a4 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/download/model/DownloadStatus.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/model/DownloadStatus.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.download.model +package suwayomi.tachidesk.manga.impl.download.model /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/extension/Extension.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/Extension.kt similarity index 88% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/extension/Extension.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/Extension.kt index 053d27e..250a713 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/extension/Extension.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/Extension.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.extension +package suwayomi.tachidesk.manga.impl.extension /* * Copyright (C) Contributors to the Suwayomi project @@ -25,23 +25,23 @@ import org.jetbrains.exposed.sql.update import org.kodein.di.DI import org.kodein.di.conf.global import org.kodein.di.instance -import suwayomi.server.ApplicationDirs -import suwayomi.tachidesk.impl.extension.ExtensionsList.extensionTableAsDataClass -import suwayomi.tachidesk.impl.extension.github.ExtensionGithubApi -import suwayomi.tachidesk.impl.util.PackageTools.EXTENSION_FEATURE -import suwayomi.tachidesk.impl.util.PackageTools.LIB_VERSION_MAX -import suwayomi.tachidesk.impl.util.PackageTools.LIB_VERSION_MIN -import suwayomi.tachidesk.impl.util.PackageTools.METADATA_NSFW -import suwayomi.tachidesk.impl.util.PackageTools.METADATA_SOURCE_CLASS -import suwayomi.tachidesk.impl.util.PackageTools.dex2jar -import suwayomi.tachidesk.impl.util.PackageTools.getPackageInfo -import suwayomi.tachidesk.impl.util.PackageTools.getSignatureHash -import suwayomi.tachidesk.impl.util.PackageTools.loadExtensionSources -import suwayomi.tachidesk.impl.util.PackageTools.trustedSignatures -import suwayomi.tachidesk.impl.util.network.await -import suwayomi.tachidesk.impl.util.storage.CachedImageResponse.getCachedImageResponse -import suwayomi.tachidesk.model.table.ExtensionTable -import suwayomi.tachidesk.model.table.SourceTable +import suwayomi.tachidesk.server.ApplicationDirs +import suwayomi.tachidesk.manga.impl.extension.ExtensionsList.extensionTableAsDataClass +import suwayomi.tachidesk.manga.impl.extension.github.ExtensionGithubApi +import suwayomi.tachidesk.manga.impl.util.PackageTools.EXTENSION_FEATURE +import suwayomi.tachidesk.manga.impl.util.PackageTools.LIB_VERSION_MAX +import suwayomi.tachidesk.manga.impl.util.PackageTools.LIB_VERSION_MIN +import suwayomi.tachidesk.manga.impl.util.PackageTools.METADATA_NSFW +import suwayomi.tachidesk.manga.impl.util.PackageTools.METADATA_SOURCE_CLASS +import suwayomi.tachidesk.manga.impl.util.PackageTools.dex2jar +import suwayomi.tachidesk.manga.impl.util.PackageTools.getPackageInfo +import suwayomi.tachidesk.manga.impl.util.PackageTools.getSignatureHash +import suwayomi.tachidesk.manga.impl.util.PackageTools.loadExtensionSources +import suwayomi.tachidesk.manga.impl.util.PackageTools.trustedSignatures +import suwayomi.tachidesk.manga.impl.util.network.await +import suwayomi.tachidesk.manga.impl.util.storage.CachedImageResponse.getCachedImageResponse +import suwayomi.tachidesk.manga.model.table.ExtensionTable +import suwayomi.tachidesk.manga.model.table.SourceTable import uy.kohesive.injekt.injectLazy import java.io.File import java.io.InputStream diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/extension/ExtensionsList.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/ExtensionsList.kt similarity index 93% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/extension/ExtensionsList.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/ExtensionsList.kt index cdeec04..5ce9ace 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/extension/ExtensionsList.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/ExtensionsList.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.extension +package suwayomi.tachidesk.manga.impl.extension /* * Copyright (C) Contributors to the Suwayomi project @@ -14,11 +14,11 @@ import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.selectAll import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.update -import suwayomi.tachidesk.impl.extension.Extension.getExtensionIconUrl -import suwayomi.tachidesk.impl.extension.github.ExtensionGithubApi -import suwayomi.tachidesk.impl.extension.github.OnlineExtension -import suwayomi.tachidesk.model.dataclass.ExtensionDataClass -import suwayomi.tachidesk.model.table.ExtensionTable +import suwayomi.tachidesk.manga.impl.extension.Extension.getExtensionIconUrl +import suwayomi.tachidesk.manga.impl.extension.github.ExtensionGithubApi +import suwayomi.tachidesk.manga.impl.extension.github.OnlineExtension +import suwayomi.tachidesk.manga.model.dataclass.ExtensionDataClass +import suwayomi.tachidesk.manga.model.table.ExtensionTable import java.util.concurrent.ConcurrentHashMap object ExtensionsList { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/extension/github/ExtensionGithubApi.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/github/ExtensionGithubApi.kt similarity index 89% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/extension/github/ExtensionGithubApi.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/github/ExtensionGithubApi.kt index 98fb6e5..5c09c41 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/extension/github/ExtensionGithubApi.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/github/ExtensionGithubApi.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.extension.github +package suwayomi.tachidesk.manga.impl.extension.github /* * Copyright (C) Contributors to the Suwayomi project @@ -13,10 +13,10 @@ import com.google.gson.JsonArray import com.google.gson.JsonParser import eu.kanade.tachiyomi.network.NetworkHelper import okhttp3.Request -import suwayomi.tachidesk.impl.util.PackageTools.LIB_VERSION_MAX -import suwayomi.tachidesk.impl.util.PackageTools.LIB_VERSION_MIN -import suwayomi.tachidesk.impl.util.network.UnzippingInterceptor -import suwayomi.tachidesk.model.dataclass.ExtensionDataClass +import suwayomi.tachidesk.manga.impl.util.PackageTools.LIB_VERSION_MAX +import suwayomi.tachidesk.manga.impl.util.PackageTools.LIB_VERSION_MIN +import suwayomi.tachidesk.manga.impl.util.network.UnzippingInterceptor +import suwayomi.tachidesk.manga.model.dataclass.ExtensionDataClass import uy.kohesive.injekt.injectLazy object ExtensionGithubApi { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/extension/github/OnlineExtension.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/github/OnlineExtension.kt similarity index 90% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/extension/github/OnlineExtension.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/github/OnlineExtension.kt index 92e4d71..893ed6f 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/extension/github/OnlineExtension.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/github/OnlineExtension.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.extension.github +package suwayomi.tachidesk.manga.impl.extension.github /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/GetHttpSource.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/GetHttpSource.kt similarity index 87% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/util/GetHttpSource.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/GetHttpSource.kt index a32cc0b..5166b9a 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/GetHttpSource.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/GetHttpSource.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.util +package suwayomi.tachidesk.manga.impl.util /* * Copyright (C) Contributors to the Suwayomi project @@ -15,10 +15,10 @@ import org.jetbrains.exposed.sql.transactions.transaction import org.kodein.di.DI import org.kodein.di.conf.global import org.kodein.di.instance -import suwayomi.server.ApplicationDirs -import suwayomi.tachidesk.impl.util.PackageTools.loadExtensionSources -import suwayomi.tachidesk.model.table.ExtensionTable -import suwayomi.tachidesk.model.table.SourceTable +import suwayomi.tachidesk.server.ApplicationDirs +import suwayomi.tachidesk.manga.impl.util.PackageTools.loadExtensionSources +import suwayomi.tachidesk.manga.model.table.ExtensionTable +import suwayomi.tachidesk.manga.model.table.SourceTable import java.util.concurrent.ConcurrentHashMap object GetHttpSource { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/PackageTools.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/PackageTools.kt similarity index 98% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/util/PackageTools.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/PackageTools.kt index 6f72299..c4ff106 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/PackageTools.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/PackageTools.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.util +package suwayomi.tachidesk.manga.impl.util /* * Copyright (C) Contributors to the Suwayomi project @@ -22,7 +22,7 @@ import org.kodein.di.conf.global import org.kodein.di.instance import org.w3c.dom.Element import org.w3c.dom.Node -import suwayomi.server.ApplicationDirs +import suwayomi.tachidesk.server.ApplicationDirs import xyz.nulldev.androidcompat.pm.InstalledPackage.Companion.toList import xyz.nulldev.androidcompat.pm.toPackageInfo import java.io.File diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/lang/RxCoroutineBridge.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/lang/RxCoroutineBridge.kt similarity index 97% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/util/lang/RxCoroutineBridge.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/lang/RxCoroutineBridge.kt index bd11224..6f8a80b 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/lang/RxCoroutineBridge.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/lang/RxCoroutineBridge.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.util.lang +package suwayomi.tachidesk.manga.impl.util.lang /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/network/OkHttp.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/network/OkHttp.kt similarity index 97% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/util/network/OkHttp.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/network/OkHttp.kt index 346f7ac..1c88f3d 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/network/OkHttp.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/network/OkHttp.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.util.network +package suwayomi.tachidesk.manga.impl.util.network /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/network/UnzippingInterceptor.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/network/UnzippingInterceptor.kt similarity index 97% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/util/network/UnzippingInterceptor.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/network/UnzippingInterceptor.kt index 7efaad8..10c24cb 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/network/UnzippingInterceptor.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/network/UnzippingInterceptor.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.util.network +package suwayomi.tachidesk.manga.impl.util.network import okhttp3.Headers import okhttp3.Interceptor diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/CachedImageResponse.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/storage/CachedImageResponse.kt similarity index 97% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/CachedImageResponse.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/storage/CachedImageResponse.kt index 2c82a5c..22f1cc1 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/CachedImageResponse.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/storage/CachedImageResponse.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.util.storage +package suwayomi.tachidesk.manga.impl.util.storage /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/ImageUtil.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/storage/ImageUtil.kt similarity index 85% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/ImageUtil.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/storage/ImageUtil.kt index 943e3d4..85c9949 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/ImageUtil.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/storage/ImageUtil.kt @@ -1,9 +1,9 @@ -package suwayomi.tachidesk.impl.util.storage +package suwayomi.tachidesk.manga.impl.util.storage -import suwayomi.tachidesk.impl.util.storage.ImageUtil.ImageType.GIF -import suwayomi.tachidesk.impl.util.storage.ImageUtil.ImageType.JPG -import suwayomi.tachidesk.impl.util.storage.ImageUtil.ImageType.PNG -import suwayomi.tachidesk.impl.util.storage.ImageUtil.ImageType.WEBP +import suwayomi.tachidesk.manga.impl.util.storage.ImageUtil.ImageType.GIF +import suwayomi.tachidesk.manga.impl.util.storage.ImageUtil.ImageType.JPG +import suwayomi.tachidesk.manga.impl.util.storage.ImageUtil.ImageType.PNG +import suwayomi.tachidesk.manga.impl.util.storage.ImageUtil.ImageType.WEBP import java.io.InputStream /* diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/OkioExtensions.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/storage/OkioExtensions.kt similarity index 96% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/OkioExtensions.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/storage/OkioExtensions.kt index 74fff39..e69c640 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/OkioExtensions.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/storage/OkioExtensions.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.util.storage +package suwayomi.tachidesk.manga.impl.util.storage /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/SafePath.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/storage/SafePath.kt similarity index 97% rename from server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/SafePath.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/storage/SafePath.kt index e70f60e..96a37b2 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/SafePath.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/storage/SafePath.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.impl.util.storage +package suwayomi.tachidesk.manga.impl.util.storage /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/CategoryDataClass.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/CategoryDataClass.kt similarity index 88% rename from server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/CategoryDataClass.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/CategoryDataClass.kt index 00ca692..726cfcc 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/CategoryDataClass.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/CategoryDataClass.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.dataclass +package suwayomi.tachidesk.manga.model.dataclass /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/ChapterDataClass.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/ChapterDataClass.kt similarity index 95% rename from server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/ChapterDataClass.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/ChapterDataClass.kt index 528effe..805ac00 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/ChapterDataClass.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/ChapterDataClass.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.dataclass +package suwayomi.tachidesk.manga.model.dataclass /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/ExtensionDataClass.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/ExtensionDataClass.kt similarity index 92% rename from server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/ExtensionDataClass.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/ExtensionDataClass.kt index 198ef22..af062ce 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/ExtensionDataClass.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/ExtensionDataClass.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.dataclass +package suwayomi.tachidesk.manga.model.dataclass /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/MangaDataClass.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/MangaDataClass.kt similarity index 89% rename from server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/MangaDataClass.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/MangaDataClass.kt index 1570a52..ee3d054 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/MangaDataClass.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/MangaDataClass.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.dataclass +package suwayomi.tachidesk.manga.model.dataclass /* * Copyright (C) Contributors to the Suwayomi project @@ -7,7 +7,7 @@ package suwayomi.tachidesk.model.dataclass * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import suwayomi.tachidesk.model.table.MangaStatus +import suwayomi.tachidesk.manga.model.table.MangaStatus data class MangaDataClass( val id: Int, diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/PageDataClass.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/PageDataClass.kt similarity index 87% rename from server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/PageDataClass.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/PageDataClass.kt index 2951853..9633e06 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/PageDataClass.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/PageDataClass.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.dataclass +package suwayomi.tachidesk.manga.model.dataclass /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/SourceDataClass.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/SourceDataClass.kt similarity index 89% rename from server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/SourceDataClass.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/SourceDataClass.kt index dd7bd4c..939a356 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/dataclass/SourceDataClass.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/dataclass/SourceDataClass.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.dataclass +package suwayomi.tachidesk.manga.model.dataclass /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/table/CategoryMangaTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/CategoryMangaTable.kt similarity index 91% rename from server/src/main/kotlin/suwayomi/tachidesk/model/table/CategoryMangaTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/CategoryMangaTable.kt index 32abed1..ff24d47 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/table/CategoryMangaTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/CategoryMangaTable.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.table +package suwayomi.tachidesk.manga.model.table /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/table/CategoryTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/CategoryTable.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/tachidesk/model/table/CategoryTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/CategoryTable.kt index 2adab48..2e96471 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/table/CategoryTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/CategoryTable.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.table +package suwayomi.tachidesk.manga.model.table /* * Copyright (C) Contributors to the Suwayomi project @@ -9,7 +9,7 @@ package suwayomi.tachidesk.model.table import org.jetbrains.exposed.dao.id.IntIdTable import org.jetbrains.exposed.sql.ResultRow -import suwayomi.tachidesk.model.dataclass.CategoryDataClass +import suwayomi.tachidesk.manga.model.dataclass.CategoryDataClass object CategoryTable : IntIdTable() { val name = varchar("name", 64) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/table/ChapterMetaTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ChapterMetaTable.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/tachidesk/model/table/ChapterMetaTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ChapterMetaTable.kt index c3ca6c8..223b202 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/table/ChapterMetaTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ChapterMetaTable.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.table +package suwayomi.tachidesk.manga.model.table import org.jetbrains.exposed.dao.id.IntIdTable import org.jetbrains.exposed.sql.ReferenceOption diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/table/ChapterTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ChapterTable.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/tachidesk/model/table/ChapterTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ChapterTable.kt index ad187d4..50ce64a 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/table/ChapterTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ChapterTable.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.table +package suwayomi.tachidesk.manga.model.table /* * Copyright (C) Contributors to the Suwayomi project @@ -11,8 +11,8 @@ import org.jetbrains.exposed.dao.id.IntIdTable import org.jetbrains.exposed.sql.ResultRow import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.tachidesk.impl.Chapter.getChapterMetaMap -import suwayomi.tachidesk.model.dataclass.ChapterDataClass +import suwayomi.tachidesk.manga.impl.Chapter.getChapterMetaMap +import suwayomi.tachidesk.manga.model.dataclass.ChapterDataClass object ChapterTable : IntIdTable() { val url = varchar("url", 2048) @@ -51,6 +51,6 @@ fun ChapterTable.toDataClass(chapterEntry: ResultRow) = chapterEntry[chapterIndex], chapterEntry[isDownloaded], chapterEntry[pageCount], - transaction { ChapterTable.select { ChapterTable.manga eq chapterEntry[manga].value }.count().toInt() }, + transaction { ChapterTable.select { manga eq chapterEntry[manga].value }.count().toInt() }, getChapterMetaMap(chapterEntry[id]), ) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/table/ExtensionTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ExtensionTable.kt similarity index 96% rename from server/src/main/kotlin/suwayomi/tachidesk/model/table/ExtensionTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ExtensionTable.kt index 6dbf09d..2a50873 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/table/ExtensionTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ExtensionTable.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.table +package suwayomi.tachidesk.manga.model.table /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/table/MangaMetaTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/MangaMetaTable.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/tachidesk/model/table/MangaMetaTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/MangaMetaTable.kt index f726997..1e83486 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/table/MangaMetaTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/MangaMetaTable.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.table +package suwayomi.tachidesk.manga.model.table import org.jetbrains.exposed.dao.id.IntIdTable import org.jetbrains.exposed.sql.ReferenceOption diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/table/MangaTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/MangaTable.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/tachidesk/model/table/MangaTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/MangaTable.kt index d1d9039..ddb1765 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/table/MangaTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/MangaTable.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.table +package suwayomi.tachidesk.manga.model.table /* * Copyright (C) Contributors to the Suwayomi project @@ -10,10 +10,10 @@ package suwayomi.tachidesk.model.table import eu.kanade.tachiyomi.source.model.SManga import org.jetbrains.exposed.dao.id.IntIdTable import org.jetbrains.exposed.sql.ResultRow -import suwayomi.tachidesk.impl.Manga.getMangaMetaMap -import suwayomi.tachidesk.impl.MangaList.proxyThumbnailUrl -import suwayomi.tachidesk.model.dataclass.MangaDataClass -import suwayomi.tachidesk.model.table.MangaStatus.Companion +import suwayomi.tachidesk.manga.impl.Manga.getMangaMetaMap +import suwayomi.tachidesk.manga.impl.MangaList.proxyThumbnailUrl +import suwayomi.tachidesk.manga.model.dataclass.MangaDataClass +import suwayomi.tachidesk.manga.model.table.MangaStatus.Companion object MangaTable : IntIdTable() { val url = varchar("url", 2048) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/table/PageTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/PageTable.kt similarity index 92% rename from server/src/main/kotlin/suwayomi/tachidesk/model/table/PageTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/PageTable.kt index f285d6e..392aefa 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/table/PageTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/PageTable.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.table +package suwayomi.tachidesk.manga.model.table /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/table/SourceTable.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/SourceTable.kt similarity index 93% rename from server/src/main/kotlin/suwayomi/tachidesk/model/table/SourceTable.kt rename to server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/SourceTable.kt index b11d1d9..fb66f3b 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/table/SourceTable.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/SourceTable.kt @@ -1,4 +1,4 @@ -package suwayomi.tachidesk.model.table +package suwayomi.tachidesk.manga.model.table /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/server/JavalinSetup.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt similarity index 94% rename from server/src/main/kotlin/suwayomi/server/JavalinSetup.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt index d431c9c..a768326 100644 --- a/server/src/main/kotlin/suwayomi/server/JavalinSetup.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt @@ -1,4 +1,4 @@ -package suwayomi.server +package suwayomi.tachidesk.server import io.javalin.Javalin import kotlinx.coroutines.CoroutineScope @@ -6,9 +6,9 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.future.future import mu.KotlinLogging -import suwayomi.anime.AnimeAPI -import suwayomi.server.util.Browser -import suwayomi.tachidesk.TachideskAPI +import suwayomi.tachidesk.anime.AnimeAPI +import suwayomi.tachidesk.server.util.Browser +import suwayomi.tachidesk.manga.TachideskAPI import java.io.IOException import java.util.concurrent.CompletableFuture import kotlin.concurrent.thread diff --git a/server/src/main/kotlin/suwayomi/server/ServerConfig.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/ServerConfig.kt similarity index 96% rename from server/src/main/kotlin/suwayomi/server/ServerConfig.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/ServerConfig.kt index 640f573..cf2c219 100644 --- a/server/src/main/kotlin/suwayomi/server/ServerConfig.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/ServerConfig.kt @@ -1,4 +1,4 @@ -package suwayomi.server +package suwayomi.tachidesk.server /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/server/ServerSetup.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/ServerSetup.kt similarity index 92% rename from server/src/main/kotlin/suwayomi/server/ServerSetup.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/ServerSetup.kt index a5c2917..1c75a38 100644 --- a/server/src/main/kotlin/suwayomi/server/ServerSetup.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/ServerSetup.kt @@ -1,4 +1,4 @@ -package suwayomi.server +package suwayomi.tachidesk.server /* * Copyright (C) Contributors to the Suwayomi project @@ -13,9 +13,10 @@ import org.kodein.di.DI import org.kodein.di.bind import org.kodein.di.conf.global import org.kodein.di.singleton -import suwayomi.server.database.databaseUp -import suwayomi.server.util.AppMutex.handleAppMutex -import suwayomi.server.util.SystemTray.systemTray +import suwayomi.server.BuildConfig +import suwayomi.tachidesk.server.database.databaseUp +import suwayomi.tachidesk.server.util.AppMutex.handleAppMutex +import suwayomi.tachidesk.server.util.SystemTray.systemTray import xyz.nulldev.androidcompat.AndroidCompat import xyz.nulldev.androidcompat.AndroidCompatInitializer import xyz.nulldev.ts.config.ApplicationRootDir @@ -64,7 +65,7 @@ fun applicationSetup() { // register Tachidesk's config which is dubbed "ServerConfig" GlobalConfigManager.registerModule( - ServerConfig.register(GlobalConfigManager.config) + ServerConfig.register(GlobalConfigManager.config) ) // Make sure only one instance of the app is running diff --git a/server/src/main/kotlin/suwayomi/server/database/DBManager.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/DBManager.kt similarity index 70% rename from server/src/main/kotlin/suwayomi/server/database/DBManager.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/DBManager.kt index 4d92768..553afa2 100644 --- a/server/src/main/kotlin/suwayomi/server/database/DBManager.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/DBManager.kt @@ -1,4 +1,4 @@ -package suwayomi.server.database +package suwayomi.tachidesk.server.database /* * Copyright (C) Contributors to the Suwayomi project @@ -11,9 +11,9 @@ import org.jetbrains.exposed.sql.Database import org.kodein.di.DI import org.kodein.di.conf.global import org.kodein.di.instance -import suwayomi.server.ApplicationDirs -import suwayomi.server.database.migration.lib.loadMigrationsFrom -import suwayomi.server.database.migration.lib.runMigrations +import suwayomi.tachidesk.server.ApplicationDirs +import suwayomi.tachidesk.server.database.migration.lib.loadMigrationsFrom +import suwayomi.tachidesk.server.database.migration.lib.runMigrations object DBManager { val db by lazy { @@ -27,6 +27,6 @@ fun databaseUp() { val db = DBManager.db db.useNestedTransactions = true - val migrations = loadMigrationsFrom("suwayomi.server.database.migration") + val migrations = loadMigrationsFrom("suwayomi.tachidesk.server.database.migration") runMigrations(migrations) } diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/M0001_Initial.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0001_Initial.kt similarity index 97% rename from server/src/main/kotlin/suwayomi/server/database/migration/M0001_Initial.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0001_Initial.kt index 4ba5077..12dc1ed 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/M0001_Initial.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0001_Initial.kt @@ -1,4 +1,4 @@ -package suwayomi.server.database.migration +package suwayomi.tachidesk.server.database.migration /* * Copyright (C) Contributors to the Suwayomi project @@ -12,7 +12,7 @@ import org.jetbrains.exposed.dao.id.IdTable import org.jetbrains.exposed.dao.id.IntIdTable import org.jetbrains.exposed.sql.SchemaUtils import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.server.database.migration.lib.Migration +import suwayomi.tachidesk.server.database.migration.lib.Migration @Suppress("ClassName", "unused") class M0001_Initial : Migration() { diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/M0002_ChapterTableIndexRename.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0002_ChapterTableIndexRename.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/server/database/migration/M0002_ChapterTableIndexRename.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0002_ChapterTableIndexRename.kt index ea20b54..582dd9f 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/M0002_ChapterTableIndexRename.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0002_ChapterTableIndexRename.kt @@ -1,4 +1,4 @@ -package suwayomi.server.database.migration +package suwayomi.tachidesk.server.database.migration /* * Copyright (C) Contributors to the Suwayomi project @@ -9,7 +9,7 @@ package suwayomi.server.database.migration import org.jetbrains.exposed.sql.transactions.TransactionManager import org.jetbrains.exposed.sql.vendors.currentDialect -import suwayomi.server.database.migration.lib.Migration +import suwayomi.tachidesk.server.database.migration.lib.Migration @Suppress("ClassName", "unused") class M0002_ChapterTableIndexRename : Migration() { diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/M0003_DefaultCategory.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0003_DefaultCategory.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/server/database/migration/M0003_DefaultCategory.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0003_DefaultCategory.kt index 2c5104b..5a3dc46 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/M0003_DefaultCategory.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0003_DefaultCategory.kt @@ -1,4 +1,4 @@ -package suwayomi.server.database.migration +package suwayomi.tachidesk.server.database.migration /* * Copyright (C) Contributors to the Suwayomi project @@ -9,7 +9,7 @@ package suwayomi.server.database.migration import org.jetbrains.exposed.sql.transactions.TransactionManager import org.jetbrains.exposed.sql.vendors.currentDialect -import suwayomi.server.database.migration.lib.Migration +import suwayomi.tachidesk.server.database.migration.lib.Migration @Suppress("ClassName", "unused") class M0003_DefaultCategory : Migration() { diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/M0004_AnimeTablesBatch1.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0004_AnimeTablesBatch1.kt similarity index 89% rename from server/src/main/kotlin/suwayomi/server/database/migration/M0004_AnimeTablesBatch1.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0004_AnimeTablesBatch1.kt index 3bca772..1abee83 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/M0004_AnimeTablesBatch1.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0004_AnimeTablesBatch1.kt @@ -1,10 +1,10 @@ -package suwayomi.server.database.migration +package suwayomi.tachidesk.server.database.migration import org.jetbrains.exposed.dao.id.IdTable import org.jetbrains.exposed.dao.id.IntIdTable import org.jetbrains.exposed.sql.SchemaUtils import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.server.database.migration.lib.Migration +import suwayomi.tachidesk.server.database.migration.lib.Migration /* * Copyright (C) Contributors to the Suwayomi project @@ -39,7 +39,7 @@ class M0004_AnimeTablesBatch1 : Migration() { override val id = long("id").entityId() val name = varchar("name", 128) val lang = varchar("lang", 10) - val extension = reference("extension", suwayomi.anime.model.table.AnimeExtensionTable) + val extension = reference("extension", suwayomi.tachidesk.anime.model.table.AnimeExtensionTable) val partOfFactorySource = bool("part_of_factory_source").default(false) } diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/M0005_AnimeTablesBatch2.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0005_AnimeTablesBatch2.kt similarity index 92% rename from server/src/main/kotlin/suwayomi/server/database/migration/M0005_AnimeTablesBatch2.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0005_AnimeTablesBatch2.kt index 35bfb21..62fcc1a 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/M0005_AnimeTablesBatch2.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0005_AnimeTablesBatch2.kt @@ -1,10 +1,10 @@ -package suwayomi.server.database.migration +package suwayomi.tachidesk.server.database.migration import eu.kanade.tachiyomi.animesource.model.SAnime import org.jetbrains.exposed.dao.id.IntIdTable import org.jetbrains.exposed.sql.SchemaUtils import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.server.database.migration.lib.Migration +import suwayomi.tachidesk.server.database.migration.lib.Migration /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/M0006_AnimeTablesBatch3.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0006_AnimeTablesBatch3.kt similarity index 87% rename from server/src/main/kotlin/suwayomi/server/database/migration/M0006_AnimeTablesBatch3.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0006_AnimeTablesBatch3.kt index 5a83f08..17d8c20 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/M0006_AnimeTablesBatch3.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0006_AnimeTablesBatch3.kt @@ -1,10 +1,10 @@ -package suwayomi.server.database.migration +package suwayomi.tachidesk.server.database.migration import org.jetbrains.exposed.dao.id.IntIdTable import org.jetbrains.exposed.sql.SchemaUtils import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.anime.model.table.AnimeTable -import suwayomi.server.database.migration.lib.Migration +import suwayomi.tachidesk.anime.model.table.AnimeTable +import suwayomi.tachidesk.server.database.migration.lib.Migration /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/M0007_ChapterIsDownloaded.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0007_ChapterIsDownloaded.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/server/database/migration/M0007_ChapterIsDownloaded.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0007_ChapterIsDownloaded.kt index f20335b..ef6cd29 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/M0007_ChapterIsDownloaded.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0007_ChapterIsDownloaded.kt @@ -1,4 +1,4 @@ -package suwayomi.server.database.migration +package suwayomi.tachidesk.server.database.migration /* * Copyright (C) Contributors to the Suwayomi project @@ -9,7 +9,7 @@ package suwayomi.server.database.migration import org.jetbrains.exposed.sql.transactions.TransactionManager import org.jetbrains.exposed.sql.vendors.currentDialect -import suwayomi.server.database.migration.lib.Migration +import suwayomi.tachidesk.server.database.migration.lib.Migration @Suppress("ClassName", "unused") class M0007_ChapterIsDownloaded : Migration() { diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/M0008_ChapterPageCount.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0008_ChapterPageCount.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/server/database/migration/M0008_ChapterPageCount.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0008_ChapterPageCount.kt index b51e98f..9b038e2 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/M0008_ChapterPageCount.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0008_ChapterPageCount.kt @@ -1,4 +1,4 @@ -package suwayomi.server.database.migration +package suwayomi.tachidesk.server.database.migration /* * Copyright (C) Contributors to the Suwayomi project @@ -9,7 +9,7 @@ package suwayomi.server.database.migration import org.jetbrains.exposed.sql.transactions.TransactionManager import org.jetbrains.exposed.sql.vendors.currentDialect -import suwayomi.server.database.migration.lib.Migration +import suwayomi.tachidesk.server.database.migration.lib.Migration @Suppress("ClassName", "unused") class M0008_ChapterPageCount : Migration() { diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/M0009_ChapterLastReadAt.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0009_ChapterLastReadAt.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/server/database/migration/M0009_ChapterLastReadAt.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0009_ChapterLastReadAt.kt index e84ee73..81a2603 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/M0009_ChapterLastReadAt.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0009_ChapterLastReadAt.kt @@ -1,4 +1,4 @@ -package suwayomi.server.database.migration +package suwayomi.tachidesk.server.database.migration /* * Copyright (C) Contributors to the Suwayomi project @@ -9,7 +9,7 @@ package suwayomi.server.database.migration import org.jetbrains.exposed.sql.transactions.TransactionManager import org.jetbrains.exposed.sql.vendors.currentDialect -import suwayomi.server.database.migration.lib.Migration +import suwayomi.tachidesk.server.database.migration.lib.Migration @Suppress("ClassName", "unused") class M0009_ChapterLastReadAt : Migration() { diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/M0010_MangaAndChapterMeta.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0010_MangaAndChapterMeta.kt similarity index 83% rename from server/src/main/kotlin/suwayomi/server/database/migration/M0010_MangaAndChapterMeta.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0010_MangaAndChapterMeta.kt index 8a8e019..a335535 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/M0010_MangaAndChapterMeta.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/M0010_MangaAndChapterMeta.kt @@ -1,12 +1,12 @@ -package suwayomi.server.database.migration +package suwayomi.tachidesk.server.database.migration import org.jetbrains.exposed.dao.id.IntIdTable import org.jetbrains.exposed.sql.ReferenceOption import org.jetbrains.exposed.sql.SchemaUtils import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.server.database.migration.lib.Migration -import suwayomi.tachidesk.model.table.ChapterTable -import suwayomi.tachidesk.model.table.MangaTable +import suwayomi.tachidesk.server.database.migration.lib.Migration +import suwayomi.tachidesk.manga.model.table.ChapterTable +import suwayomi.tachidesk.manga.model.table.MangaTable /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/lib/LICENSE b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/lib/LICENSE similarity index 100% rename from server/src/main/kotlin/suwayomi/server/database/migration/lib/LICENSE rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/lib/LICENSE diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/lib/Migration.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/lib/Migration.kt similarity index 93% rename from server/src/main/kotlin/suwayomi/server/database/migration/lib/Migration.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/lib/Migration.kt index 4310c1b..6dbba20 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/lib/Migration.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/lib/Migration.kt @@ -1,4 +1,4 @@ -package suwayomi.server.database.migration.lib +package suwayomi.tachidesk.server.database.migration.lib /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/lib/MigrationEntity.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/lib/MigrationEntity.kt similarity index 95% rename from server/src/main/kotlin/suwayomi/server/database/migration/lib/MigrationEntity.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/lib/MigrationEntity.kt index 6d96a75..04c71c0 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/lib/MigrationEntity.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/lib/MigrationEntity.kt @@ -1,4 +1,4 @@ -package suwayomi.server.database.migration.lib +package suwayomi.tachidesk.server.database.migration.lib /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/server/database/migration/lib/runMigrations.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/lib/runMigrations.kt similarity index 95% rename from server/src/main/kotlin/suwayomi/server/database/migration/lib/runMigrations.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/lib/runMigrations.kt index c226c1c..cf1dc33 100644 --- a/server/src/main/kotlin/suwayomi/server/database/migration/lib/runMigrations.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/database/migration/lib/runMigrations.kt @@ -1,4 +1,4 @@ -package suwayomi.server.database.migration.lib +package suwayomi.tachidesk.server.database.migration.lib /* * Copyright (C) Contributors to the Suwayomi project @@ -17,7 +17,7 @@ import org.jetbrains.exposed.sql.SchemaUtils.create import org.jetbrains.exposed.sql.exists import org.jetbrains.exposed.sql.transactions.TransactionManager import org.jetbrains.exposed.sql.transactions.transaction -import suwayomi.server.ServerConfig +import suwayomi.tachidesk.server.ServerConfig import java.nio.file.FileSystems import java.nio.file.Files import java.nio.file.Paths @@ -63,7 +63,7 @@ fun runMigrations(migrations: List, database: Database = TransactionM @OptIn(ExperimentalPathApi::class) private fun getTopLevelClasses(packageName: String): List> { - ServerConfig::class.java.getResource("/" + "suwayomi.server.database.migration".replace('.', '/')) + ServerConfig::class.java.getResource("/" + packageName.replace('.', '/')) val path = "/" + packageName.replace('.', '/') val uri = ServerConfig::class.java.getResource(path).toURI() diff --git a/server/src/main/kotlin/suwayomi/server/impl/About.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/impl/About.kt similarity index 95% rename from server/src/main/kotlin/suwayomi/server/impl/About.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/impl/About.kt index e0148f7..6388e4b 100644 --- a/server/src/main/kotlin/suwayomi/server/impl/About.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/impl/About.kt @@ -1,4 +1,4 @@ -package suwayomi.server.impl +package suwayomi.tachidesk.server.impl /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/server/util/AppExit.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/util/AppExit.kt similarity index 94% rename from server/src/main/kotlin/suwayomi/server/util/AppExit.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/util/AppExit.kt index 4e44e7e..b636045 100644 --- a/server/src/main/kotlin/suwayomi/server/util/AppExit.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/util/AppExit.kt @@ -1,4 +1,4 @@ -package suwayomi.server.util +package suwayomi.tachidesk.server.util /* * Copyright (C) Contributors to the Suwayomi project diff --git a/server/src/main/kotlin/suwayomi/server/util/AppMutex.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/util/AppMutex.kt similarity index 79% rename from server/src/main/kotlin/suwayomi/server/util/AppMutex.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/util/AppMutex.kt index ae8b2d4..f2fab27 100644 --- a/server/src/main/kotlin/suwayomi/server/util/AppMutex.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/util/AppMutex.kt @@ -1,4 +1,4 @@ -package suwayomi.server.util +package suwayomi.tachidesk.server.util /* * Copyright (C) Contributors to the Suwayomi project @@ -11,14 +11,14 @@ import io.javalin.plugin.json.JavalinJackson import mu.KotlinLogging import okhttp3.OkHttpClient import okhttp3.Request.Builder -import suwayomi.server.impl.AboutDataClass -import suwayomi.server.serverConfig -import suwayomi.server.util.AppMutex.AppMutexStat.Clear -import suwayomi.server.util.AppMutex.AppMutexStat.OtherApplicationRunning -import suwayomi.server.util.AppMutex.AppMutexStat.TachideskInstanceRunning -import suwayomi.server.util.Browser.openInBrowser -import suwayomi.server.util.ExitCode.MutexCheckFailedAnotherAppRunning -import suwayomi.server.util.ExitCode.MutexCheckFailedTachideskRunning +import suwayomi.tachidesk.server.impl.AboutDataClass +import suwayomi.tachidesk.server.serverConfig +import suwayomi.tachidesk.server.util.AppMutex.AppMutexStat.Clear +import suwayomi.tachidesk.server.util.AppMutex.AppMutexStat.OtherApplicationRunning +import suwayomi.tachidesk.server.util.AppMutex.AppMutexStat.TachideskInstanceRunning +import suwayomi.tachidesk.server.util.Browser.openInBrowser +import suwayomi.tachidesk.server.util.ExitCode.MutexCheckFailedAnotherAppRunning +import suwayomi.tachidesk.server.util.ExitCode.MutexCheckFailedTachideskRunning import java.io.IOException import java.util.concurrent.TimeUnit diff --git a/server/src/main/kotlin/suwayomi/server/util/Browser.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/util/Browser.kt similarity index 83% rename from server/src/main/kotlin/suwayomi/server/util/Browser.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/util/Browser.kt index 8a9e4ad..9fbf97a 100644 --- a/server/src/main/kotlin/suwayomi/server/util/Browser.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/util/Browser.kt @@ -1,4 +1,4 @@ -package suwayomi.server.util +package suwayomi.tachidesk.server.util /* * Copyright (C) Contributors to the Suwayomi project @@ -8,7 +8,7 @@ package suwayomi.server.util * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import dorkbox.util.Desktop -import suwayomi.server.serverConfig +import suwayomi.tachidesk.server.serverConfig object Browser { private val appIP = if (serverConfig.ip == "0.0.0.0") "127.0.0.1" else serverConfig.ip @@ -18,11 +18,11 @@ object Browser { fun openInBrowser() { - val openInElectron = System.getProperty("suwayomi.server.webInterface")?.equals("electron") + val openInElectron = System.getProperty("suwayomi.tachidesk.server.webInterface")?.equals("electron") if (openInElectron == true) { try { - val electronPath = System.getProperty("suwayomi.server.electronPath")!! + val electronPath = System.getProperty("suwayomi.tachidesk.server.electronPath")!! electronInstances.add(ProcessBuilder(electronPath, appBaseUrl).start()) } catch (e: Throwable) { // cover both java.lang.Exception and java.lang.Error e.printStackTrace() diff --git a/server/src/main/kotlin/suwayomi/server/util/SystemTray.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/util/SystemTray.kt similarity index 86% rename from server/src/main/kotlin/suwayomi/server/util/SystemTray.kt rename to server/src/main/kotlin/suwayomi/tachidesk/server/util/SystemTray.kt index 9b03a39..3fc347c 100644 --- a/server/src/main/kotlin/suwayomi/server/util/SystemTray.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/util/SystemTray.kt @@ -1,4 +1,4 @@ -package suwayomi.server.util +package suwayomi.tachidesk.server.util /* * Copyright (C) Contributors to the Suwayomi project @@ -11,10 +11,10 @@ import dorkbox.systemTray.MenuItem import dorkbox.systemTray.SystemTray import dorkbox.util.CacheUtil import suwayomi.server.BuildConfig -import suwayomi.server.ServerConfig -import suwayomi.server.serverConfig -import suwayomi.server.util.Browser.openInBrowser -import suwayomi.server.util.ExitCode.Success +import suwayomi.tachidesk.server.ServerConfig +import suwayomi.tachidesk.server.serverConfig +import suwayomi.tachidesk.server.util.Browser.openInBrowser +import suwayomi.tachidesk.server.util.ExitCode.Success object SystemTray { fun systemTray(): SystemTray? { diff --git a/server/src/test/kotlin/suwayomi/TestExtensions.kt b/server/src/test/kotlin/suwayomi/TestExtensions.kt index 5b9552d..725fa3b 100644 --- a/server/src/test/kotlin/suwayomi/TestExtensions.kt +++ b/server/src/test/kotlin/suwayomi/TestExtensions.kt @@ -21,15 +21,15 @@ import org.junit.jupiter.api.BeforeAll import org.junit.jupiter.api.Test import org.junit.jupiter.api.TestInstance import rx.Observable -import suwayomi.server.applicationSetup -import suwayomi.tachidesk.impl.Source.getSourceList -import suwayomi.tachidesk.impl.extension.Extension.installExtension -import suwayomi.tachidesk.impl.extension.Extension.uninstallExtension -import suwayomi.tachidesk.impl.extension.Extension.updateExtension -import suwayomi.tachidesk.impl.extension.ExtensionsList.getExtensionList -import suwayomi.tachidesk.impl.util.GetHttpSource.getHttpSource -import suwayomi.tachidesk.impl.util.lang.awaitSingle -import suwayomi.tachidesk.model.dataclass.ExtensionDataClass +import suwayomi.tachidesk.server.applicationSetup +import suwayomi.tachidesk.manga.impl.Source.getSourceList +import suwayomi.tachidesk.manga.impl.extension.Extension.installExtension +import suwayomi.tachidesk.manga.impl.extension.Extension.uninstallExtension +import suwayomi.tachidesk.manga.impl.extension.Extension.updateExtension +import suwayomi.tachidesk.manga.impl.extension.ExtensionsList.getExtensionList +import suwayomi.tachidesk.manga.impl.util.GetHttpSource.getHttpSource +import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle +import suwayomi.tachidesk.manga.model.dataclass.ExtensionDataClass import java.io.File @TestInstance(TestInstance.Lifecycle.PER_CLASS)