music: fix selector error with malformed folders
Forgot that i is not a good indicator of if we need to begin a selector or not since we may discard certain music folders.
This commit is contained in:
parent
5d5356e46e
commit
6a0fd76636
1 changed files with 2 additions and 2 deletions
|
@ -137,7 +137,7 @@ private constructor(private val cursor: Cursor, volumeManager: VolumeManager) :
|
|||
val path = paths[i]
|
||||
val volume = path.volume.components ?: continue
|
||||
template +=
|
||||
if (i == 0) {
|
||||
if (args.isEmpty()) {
|
||||
"${MediaStore.Audio.AudioColumns.DATA} LIKE ?"
|
||||
} else {
|
||||
" OR ${MediaStore.Audio.AudioColumns.DATA} LIKE ?"
|
||||
|
@ -217,7 +217,7 @@ private constructor(private val cursor: Cursor, volumeManager: VolumeManager) :
|
|||
for (i in paths.indices) {
|
||||
val path = paths[i]
|
||||
template =
|
||||
if (i == 0) {
|
||||
if (args.isEmpty()) {
|
||||
"(${MediaStore.Audio.AudioColumns.VOLUME_NAME} LIKE ? " +
|
||||
"AND ${MediaStore.Audio.AudioColumns.RELATIVE_PATH} LIKE ?)"
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue