Setting: Creates folders according to manga title (#4861)
* cherry-picking my changes * Update SettingsDownloadController.kt * Update SettingsDownloadController.kt * Update ReaderPresenter.kt Co-authored-by: arkon <arkon@users.noreply.github.com>
This commit is contained in:
@@ -556,11 +556,14 @@ class ReaderPresenter(
|
||||
notifier.onClear()
|
||||
|
||||
// Pictures directory.
|
||||
val destDir = File(
|
||||
Environment.getExternalStorageDirectory().absolutePath +
|
||||
val baseDir = Environment.getExternalStorageDirectory().absolutePath +
|
||||
File.separator + Environment.DIRECTORY_PICTURES +
|
||||
File.separator + context.getString(R.string.app_name)
|
||||
)
|
||||
val destDir = if (preferences.folderPerManga()) {
|
||||
File(baseDir + File.separator + manga.title)
|
||||
} else {
|
||||
File(baseDir)
|
||||
}
|
||||
|
||||
// Copy file in background.
|
||||
Observable.fromCallable { saveImage(page, destDir, manga) }
|
||||
|
||||
Reference in New Issue
Block a user