mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-26 19:17:51 +02:00
Revert "Always attempt to split tall images when downloading"
This partially reverts commit 2769525b2c
.
Keeps the change to silently ignore spliting errors since it falls back to
the original images in those cases.
This commit is contained in:
@ -55,6 +55,11 @@ object SettingsDownloadScreen : SearchableSettings {
|
||||
pref = downloadPreferences.saveChaptersAsCBZ(),
|
||||
title = stringResource(R.string.save_chapter_as_cbz),
|
||||
),
|
||||
Preference.PreferenceItem.SwitchPreference(
|
||||
pref = downloadPreferences.splitTallImages(),
|
||||
title = stringResource(R.string.split_tall_images),
|
||||
subtitle = stringResource(R.string.split_tall_images_summary),
|
||||
),
|
||||
getDeleteChaptersGroup(
|
||||
downloadPreferences = downloadPreferences,
|
||||
categories = allCategories,
|
||||
|
@ -495,6 +495,8 @@ class Downloader(
|
||||
}
|
||||
|
||||
private fun splitTallImageIfNeeded(page: Page, tmpDir: UniFile) {
|
||||
if (!downloadPreferences.splitTallImages().get()) return
|
||||
|
||||
try {
|
||||
val filenamePrefix = String.format("%03d", page.number)
|
||||
val imageFile = tmpDir.listFiles()?.firstOrNull { it.name.orEmpty().startsWith(filenamePrefix) }
|
||||
|
Reference in New Issue
Block a user