music: eliminate odd songs with no size

Remove malformed songs that have a size of 0 bytes, but are still
present in MediaStore.

This issue only seems to occur when files are transferred via MTP, but
are not loaded due to storage issues.
This commit is contained in:
OxygenCobalt 2022-06-11 16:28:09 -06:00
parent c95edfa28b
commit 47437c355d
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
2 changed files with 6 additions and 1 deletions

View file

@ -3,6 +3,7 @@
## dev [v2.3.2, v2.4.0, or v3.0.0]
#### What's New
- Added a new view for song properties (Such as Bitrate)
- Folders on external drives can now be excluded on Android Q+ [#134]
- Playback bar now has a skip action
- When playing, the cover now shows an animated indicator
@ -14,6 +15,8 @@
#### What's Fixed
- Playback bar now picks the larger inset in case that gesture inset is missing [#149]
- Fixed unusable excluded directory UI
- Songs with no data (i.e size of 0) are now filtered out
#### Dev/Meta
- New translations [Fjuro -> Czech]

View file

@ -342,7 +342,9 @@ abstract class MediaStoreBackend : Indexer.Backend {
* The base selector that works across all versions of android. Does not exclude
* directories.
*/
@JvmStatic protected val BASE_SELECTOR = "${MediaStore.Audio.Media.IS_MUSIC}=1"
@JvmStatic
protected val BASE_SELECTOR =
"${MediaStore.Audio.Media.IS_MUSIC}=1 AND NOT ${MediaStore.Audio.Media.SIZE}=0"
}
}