mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-22 23:17:00 +00:00
Add uploader name of streams as subtitle of MediaItems
They should be displayed only by Android Auto if they are known, i.e. when they are not empty.
This commit is contained in:
parent
4fc92cbaa4
commit
c916608c98
@ -139,6 +139,7 @@ public class MediaBrowserConnector implements MediaSessionConnector.PlaybackPrep
|
||||
final var builder = new MediaDescriptionCompat.Builder();
|
||||
builder.setMediaId(createMediaIdForPlaylistIndex(playlistId, index))
|
||||
.setTitle(item.getStreamEntity().getTitle())
|
||||
.setSubtitle(item.getStreamEntity().getUploader())
|
||||
.setIconUri(Uri.parse(item.getStreamEntity().getThumbnailUrl()));
|
||||
|
||||
return new MediaItem(builder.build(), MediaItem.FLAG_PLAYABLE);
|
||||
@ -207,6 +208,7 @@ public class MediaBrowserConnector implements MediaSessionConnector.PlaybackPrep
|
||||
final var builder = new MediaDescriptionCompat.Builder();
|
||||
builder.setMediaId(ID_STREAM + '/' + streamHistoryEntry.getStreamId())
|
||||
.setTitle(streamHistoryEntry.getStreamEntity().getTitle())
|
||||
.setSubtitle(streamHistoryEntry.getStreamEntity().getUploader())
|
||||
.setIconUri(Uri.parse(streamHistoryEntry.getStreamEntity().getThumbnailUrl()));
|
||||
|
||||
return new MediaItem(builder.build(), MediaItem.FLAG_PLAYABLE);
|
||||
|
Loading…
Reference in New Issue
Block a user