1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-23 03:22:37 +01:00

Add title to additional metadata object

This commit is contained in:
Alan Nelson 2019-07-11 00:48:28 -05:00
parent ccdd450283
commit ee9052ad3d

View File

@ -58,6 +58,7 @@ public class BasePlayerMediaSession implements MediaSessionCallback {
// set additional metadata for A2DP/AVRCP
Bundle additionalMetadata = new Bundle();
additionalMetadata.putString(MediaMetadataCompat.METADATA_KEY_TITLE, item.getTitle());
additionalMetadata.putString(MediaMetadataCompat.METADATA_KEY_ARTIST, item.getUploader());
additionalMetadata.putLong(MediaMetadataCompat.METADATA_KEY_DURATION, item.getDuration() * 1000);
additionalMetadata.putLong(MediaMetadataCompat.METADATA_KEY_TRACK_NUMBER, index + 1);