fix: Fix recorder for Android level 33

This commit is contained in:
Myzel394 2024-01-05 19:39:19 +01:00
parent 08a6d557f8
commit 298ce13369
No known key found for this signature in database
GPG Key ID: 79CC92F37B3E1A2B
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,6 @@ import app.myzel394.alibi.ui.RECORDER_MEDIA_SELECTED_VALUE
import app.myzel394.alibi.ui.SUPPORTS_SCOPED_STORAGE
import app.myzel394.alibi.ui.utils.PermissionHelper
import com.arthenica.ffmpegkit.FFprobeKit
import com.arthenica.ffmpegkit.FFprobeSession
import kotlinx.coroutines.CompletableDeferred
import kotlin.reflect.KFunction4
@ -464,7 +463,7 @@ abstract class BatchesFolder(
context.contentResolver.query(
scopedMediaContentUri,
arrayOf(MediaStore.MediaColumns._ID, MediaStore.MediaColumns.DISPLAY_NAME),
"${MediaStore.MediaColumns.DISPLAY_NAME} = '$name' AND ${Media.RELATIVE_PATH} = '$relativePath'",
"${MediaStore.MediaColumns.DISPLAY_NAME} = '$name'",
null,
null,
)!!.use { cursor ->

View File

@ -243,6 +243,7 @@ class VideoRecorderService :
).build()
)
} else if (batchesFolder.type == BatchesFolder.BatchType.MEDIA) {
// TODO: Add screen with help where the recordings are saved
if (SUPPORTS_SCOPED_STORAGE) {
val name = getNameForMediaFile()