[Android] Use shared media subtitle function
Robert Stone
git at videolan.org
Tue Jul 12 07:56:38 UTC 2022
vlc-android | branch: master | Robert Stone <rhstone at gmail.com> | Mon Jul 11 23:59:18 2022 -0700| [71baada7d8b64b1905dbaaf2b4d07b4dc3b3694a] | committer: Robert Stone
Use shared media subtitle function
> https://code.videolan.org/videolan/vlc-android/commit/71baada7d8b64b1905dbaaf2b4d07b4dc3b3694a
---
.../src/org/videolan/vlc/gui/audio/AudioAlbumTracksAdapter.kt | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumTracksAdapter.kt b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumTracksAdapter.kt
index 0a5fd8cfc..58948cf4d 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumTracksAdapter.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumTracksAdapter.kt
@@ -40,6 +40,7 @@ import org.videolan.vlc.BR
import org.videolan.vlc.databinding.AudioAlbumTrackItemBinding
import org.videolan.vlc.interfaces.IEventsHandler
import org.videolan.vlc.interfaces.IListEventsHandler
+import org.videolan.vlc.media.MediaUtils
import org.videolan.vlc.util.TextUtils
class AudioAlbumTracksAdapter @JvmOverloads constructor(
@@ -100,10 +101,7 @@ class AudioAlbumTracksAdapter @JvmOverloads constructor(
binding.trackNumber.text = "${item.trackNumber}."
else
binding.trackNumber.visibility = View.GONE
- var subtitle = Tools.millisToString(item.length)
- if (item.artist.isNotEmpty())
- subtitle += " ${TextUtils.separator} ${item.artist}"
- binding.subtitle.text = subtitle
+ binding.subtitle.text = MediaUtils.getMediaSubtitle(item)
}
override fun recycle() {
More information about the Android
mailing list