Skip to content

Commit

Permalink
Rename "mangaDownloadsRoot" to "downloadRoot"
Browse files Browse the repository at this point in the history
  • Loading branch information
schroda committed Jul 13, 2023
1 parent f3d2955 commit 98095db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fun getThumbnailDownloadPath(mangaId: Int): String {
}

fun getChapterDownloadPath(mangaId: Int, chapterId: Int): String {
return applicationDirs.mangaDownloadsRoot + "/" + getChapterDir(mangaId, chapterId)
return applicationDirs.downloadsRoot + "/" + getChapterDir(mangaId, chapterId)
}

fun getChapterCbzPath(mangaId: Int, chapterId: Int): String {
Expand All @@ -70,8 +70,8 @@ fun updateMangaDownloadDir(mangaId: Int, newTitle: String): Boolean {

val newMangaDir = SafePath.buildValidFilename(newTitle)

val oldDir = "${applicationDirs.mangaDownloadsRoot}/$sourceDir/$mangaDir"
val newDir = "${applicationDirs.mangaDownloadsRoot}/$sourceDir/$newMangaDir"
val oldDir = "${applicationDirs.downloadsRoot}/$sourceDir/$mangaDir"
val newDir = "${applicationDirs.downloadsRoot}/$sourceDir/$newMangaDir"

val oldDirFile = File(oldDir)
val newDirFile = File(newDir)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ class ApplicationDirs(
) {
val cacheRoot = System.getProperty("java.io.tmpdir") + "/tachidesk"
val extensionsRoot = "$dataRoot/extensions"
val mangaDownloadsRoot = serverConfig.downloadsPath.ifBlank { "$dataRoot/downloads" }
val downloadsRoot = serverConfig.downloadsPath.ifBlank { "$dataRoot/downloads" }
val localMangaRoot = "$dataRoot/local"
val webUIRoot = "$dataRoot/webUI"
val automatedBackupRoot = serverConfig.backupPath.ifBlank { "$dataRoot/backups" }

val tempThumbnailCacheRoot = "$tempRoot/thumbnails"
val tempMangaCacheRoot = "$tempRoot/manga-cache"

val thumbnailDownloadsRoot = "$mangaDownloadsRoot/thumbnails"
val thumbnailDownloadsRoot = "$downloadsRoot/thumbnails"
}

val serverConfig: ServerConfig by lazy { GlobalConfigManager.module() }
Expand Down Expand Up @@ -94,7 +94,7 @@ fun applicationSetup() {
applicationDirs.extensionsRoot,
applicationDirs.extensionsRoot + "/icon",
applicationDirs.tempThumbnailCacheRoot,
applicationDirs.mangaDownloadsRoot,
applicationDirs.downloadsRoot,
applicationDirs.localMangaRoot
).forEach {
File(it).mkdirs()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ open class ApplicationTest {
applicationDirs.extensionsRoot,
applicationDirs.extensionsRoot + "/icon",
applicationDirs.tempThumbnailCacheRoot,
applicationDirs.mangaDownloadsRoot,
applicationDirs.downloadsRoot,
applicationDirs.localMangaRoot
).forEach {
File(it).mkdirs()
Expand Down

0 comments on commit 98095db

Please sign in to comment.