mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 23:06:38 +01:00
fix for library bug. Temp file name with "_temp" is returned instead of final file name
This commit is contained in:
@@ -270,9 +270,16 @@ class VideoCompressionHelper {
|
|||||||
"Compressed [$size] ($reductionPercent% reduction)",
|
"Compressed [$size] ($reductionPercent% reduction)",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Attempt to correct the path: if it contains "_temp" then remove it
|
||||||
|
val correctedPath =
|
||||||
|
if (path.contains("_temp")) {
|
||||||
|
path.replace("_temp", "")
|
||||||
|
} else {
|
||||||
|
path
|
||||||
|
}
|
||||||
if (continuation.isActive) {
|
if (continuation.isActive) {
|
||||||
continuation.resume(
|
continuation.resume(
|
||||||
MediaCompressorResult(Uri.fromFile(File(path)), contentType, size),
|
MediaCompressorResult(Uri.fromFile(File(correctedPath)), contentType, size),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user