lets use the recordings title instead of the display name, so no extension

This commit is contained in:
tibbi 2020-03-31 22:59:32 +02:00
parent 8c982c4f3b
commit 95a0630688
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager
val uri = MediaStore.Audio.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY)
val projection = arrayOf(
MediaStore.Audio.Media.DISPLAY_NAME,
MediaStore.Audio.Media.TITLE,
MediaStore.Audio.Media._ID
)
@ -57,7 +57,7 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager
cursor = context.contentResolver.query(uri, projection, selection, selectionArgs, sorting)
if (cursor?.moveToFirst() == true) {
do {
val title = cursor.getStringValue(MediaStore.Audio.Media.DISPLAY_NAME)
val title = cursor.getStringValue(MediaStore.Audio.Media.TITLE)
val id = cursor.getIntValue(MediaStore.Audio.Media._ID)
val recording = Recording(id, title, "")
recordings.add(recording)