mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-11 11:38:56 +01:00
Revert "Always save pages/covers in subfolders"
This reverts commit 8568d5d6c3.
Closes #10052
This commit is contained in:
@@ -102,8 +102,8 @@ class MangaCoverScreenModel(
|
||||
imageSaver.save(
|
||||
Image.Cover(
|
||||
bitmap = bitmap,
|
||||
name = "cover",
|
||||
location = if (temp) Location.Cache else Location.Pictures(manga.title),
|
||||
name = manga.title,
|
||||
location = if (temp) Location.Cache else Location.Pictures.create(),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -758,14 +758,17 @@ class ReaderViewModel @JvmOverloads constructor(
|
||||
|
||||
val filename = generateFilename(manga, page)
|
||||
|
||||
// Copy file in background
|
||||
// Pictures directory.
|
||||
val relativePath = if (readerPreferences.folderPerManga().get()) DiskUtil.buildValidFilename(manga.title) else ""
|
||||
|
||||
// Copy file in background.
|
||||
viewModelScope.launchNonCancellable {
|
||||
try {
|
||||
val uri = imageSaver.save(
|
||||
image = Image.Page(
|
||||
inputStream = page.stream!!,
|
||||
name = filename,
|
||||
location = Location.Pictures(DiskUtil.buildValidFilename(manga.title)),
|
||||
location = Location.Pictures.create(relativePath),
|
||||
),
|
||||
)
|
||||
withUIContext {
|
||||
|
||||
@@ -56,6 +56,8 @@ class ReaderPreferences(
|
||||
|
||||
fun readerHideThreshold() = preferenceStore.getEnum("reader_hide_threshold", ReaderHideThreshold.LOW)
|
||||
|
||||
fun folderPerManga() = preferenceStore.getBoolean("create_folder_per_manga", false)
|
||||
|
||||
fun skipRead() = preferenceStore.getBoolean("skip_read", false)
|
||||
|
||||
fun skipFiltered() = preferenceStore.getBoolean("skip_filtered", true)
|
||||
|
||||
Reference in New Issue
Block a user