mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 11:07:24 +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)",
|
||||
)
|
||||
|
||||
// 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) {
|
||||
continuation.resume(
|
||||
MediaCompressorResult(Uri.fromFile(File(path)), contentType, size),
|
||||
MediaCompressorResult(Uri.fromFile(File(correctedPath)), contentType, size),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user