Fix long line

This commit is contained in:
Benoit Marty 2021-05-05 15:48:11 +02:00
parent e28556dd1b
commit 080bdf1495
1 changed files with 5 additions and 4 deletions

View File

@ -194,10 +194,11 @@ internal class UploadContentWorker(val context: Context, params: WorkerParameter
tryOrNull { tryOrNull {
context.contentResolver.openFileDescriptor(compressedFile.toUri(), "r")?.use { pfd -> context.contentResolver.openFileDescriptor(compressedFile.toUri(), "r")?.use { pfd ->
val mediaMetadataRetriever = MediaMetadataRetriever() MediaMetadataRetriever().let {
mediaMetadataRetriever.setDataSource(pfd.fileDescriptor) it.setDataSource(pfd.fileDescriptor)
compressedWidth = mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH)?.toInt() compressedWidth = it.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH)?.toInt()
compressedHeight = mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT)?.toInt() compressedHeight = it.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT)?.toInt()
}
} }
} }