Skip to content

Commit

Permalink
Merge pull request #2453 from m0n1ker/issue-2240
Browse files Browse the repository at this point in the history
Update play queue metadata
  • Loading branch information
theScrabi authored Jul 21, 2019
2 parents f879f54 + 8a43e24 commit 6787d02
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ public MediaDescriptionCompat getQueueMetadata(int index) {

// 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());
additionalMetadata.putLong(MediaMetadataCompat.METADATA_KEY_DURATION, item.getDuration() * 1000);
additionalMetadata.putLong(MediaMetadataCompat.METADATA_KEY_TRACK_NUMBER, index + 1);
additionalMetadata.putLong(MediaMetadataCompat.METADATA_KEY_NUM_TRACKS, player.getPlayQueue().size());
descriptionBuilder.setExtras(additionalMetadata);

final Uri thumbnailUri = Uri.parse(item.getThumbnailUrl());
Expand Down

0 comments on commit 6787d02

Please sign in to comment.