[Android] Add support for remote cover art in the android auto queue
Robert Stone
git at videolan.org
Tue Dec 1 13:11:24 CET 2020
vlc-android | branch: master | Robert Stone <rhstone at gmail.com> | Sun Nov 29 20:31:12 2020 -0800| [f96ab338f7e9477f00738e8d6582b90e04e5b533] | committer: Nicolas Pomepuy
Add support for remote cover art in the android auto queue
> https://code.videolan.org/videolan/vlc-android/commit/f96ab338f7e9477f00738e8d6582b90e04e5b533
---
application/vlc-android/src/org/videolan/vlc/PlaybackService.kt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
index 926861735..2ea1522b0 100644
--- a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
+++ b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
@@ -1147,11 +1147,13 @@ class PlaybackService : MediaBrowserServiceCompat(), LifecycleOwner {
for ((position, media) in mediaList.subList(fromIndex, toIndex).withIndex()) {
val title: String = media.nowPlaying ?: media.title
val mediaId = MediaSessionBrowser.generateMediaId(media)
+ val iconUri = if (isSchemeHttpOrHttps(media.artworkMrl)) Uri.parse(media.artworkMrl)
+ else artworkMap[mediaId] ?: MediaSessionBrowser.DEFAULT_TRACK_ICON
val mediaDesc = MediaDescriptionCompat.Builder()
.setTitle(title)
.setSubtitle(MediaUtils.getMediaArtist(ctx, media))
.setDescription(MediaUtils.getMediaAlbum(ctx, media))
- .setIconUri(artworkMap[mediaId] ?: MediaSessionBrowser.DEFAULT_TRACK_ICON)
+ .setIconUri(iconUri)
.setMediaUri(media.uri)
.setMediaId(mediaId)
.build()
More information about the Android
mailing list