fix: discard overlay segment from ZIP container when saving stories
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user