fix: discard overlay segment from ZIP container when saving stories

This commit is contained in:
Majjo
2026-04-19 12:49:18 +02:00
parent 760d652f5f
commit e23bf443a1

View File

@@ -623,6 +623,7 @@ class DownloadProcessor (
zipFile.inputStream().use { zipFileInputStream ->
MediaDownloaderHelper.getSplitElements(zipFileInputStream) { type, inputStream ->
if (type == SplitMediaAssetType.OVERLAY) return@getSplitElements
createMediaTempFile().apply {
outputStream().use {
inputStream.copyTo(it)
@@ -631,7 +632,7 @@ class DownloadProcessor (
downloadedMedias[InputMedia(
type = DownloadMediaType.LOCAL_MEDIA,
content = it.absolutePath,
isOverlay = type == SplitMediaAssetType.OVERLAY
isOverlay = false
)] = it
}
}
@@ -640,8 +641,6 @@ class DownloadProcessor (
oldDownloadedMedias.forEach { (_, value) ->
value.delete()
}
shouldMergeOverlay = true
}
if (shouldMergeOverlay) {