Skip to content
Snippets Groups Projects
Commit ad2e0126 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Fix broadcasted metadata and add the chapter

Fixes #2725


(cherry picked from commit 0cbe78a4)
parent eeeb65b0
Branches master
No related tags found
No related merge requests found
......@@ -1250,11 +1250,14 @@ class PlaybackService : MediaBrowserServiceCompat(), LifecycleOwner, CoroutineSc
if (lifecycleScope.isActive) lifecycleScope.launch(Dispatchers.Default) {
sendBroadcast(Intent("com.android.music.metachanged")
.putExtra("track", media.nowPlaying ?: media.title)
.putExtra("artist", media.artist)
.putExtra("album", media.album)
.putExtra("artist", MediaUtils.getMediaArtist(this@PlaybackService, media))
.putExtra("album", MediaUtils.getMediaAlbum(this@PlaybackService, media))
.putExtra("duration", media.length)
.putExtra("playing", isPlaying)
.putExtra("package", "org.videolan.vlc"))
.putExtra("package", "org.videolan.vlc")
.apply {
if (lastChaptersCount > 0) getCurrentChapter()?.let { putExtra("chapter", it) }
})
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment