mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-22 16:10:31 +00:00
Fix crash with disabled thumbnails when trying to play a stream
This commit is contained in:
parent
0d8d3479e1
commit
e6965622bd
@ -81,8 +81,9 @@ public interface MediaItemTag {
|
|||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
default MediaItem asMediaItem() {
|
default MediaItem asMediaItem() {
|
||||||
|
final String thumbnailUrl = getThumbnailUrl();
|
||||||
final MediaMetadata mediaMetadata = new MediaMetadata.Builder()
|
final MediaMetadata mediaMetadata = new MediaMetadata.Builder()
|
||||||
.setArtworkUri(Uri.parse(getThumbnailUrl()))
|
.setArtworkUri(thumbnailUrl == null ? null : Uri.parse(thumbnailUrl))
|
||||||
.setArtist(getUploaderName())
|
.setArtist(getUploaderName())
|
||||||
.setDescription(getTitle())
|
.setDescription(getTitle())
|
||||||
.setDisplayTitle(getTitle())
|
.setDisplayTitle(getTitle())
|
||||||
|
Loading…
Reference in New Issue
Block a user