1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-25 04:22:30 +01:00

Fix crash with disabled thumbnails when trying to play a stream

This commit is contained in:
TobiGr 2023-10-07 14:34:44 +02:00 committed by Stypox
parent 0d8d3479e1
commit e6965622bd
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23

View File

@ -81,8 +81,9 @@ public interface MediaItemTag {
@NonNull
default MediaItem asMediaItem() {
final String thumbnailUrl = getThumbnailUrl();
final MediaMetadata mediaMetadata = new MediaMetadata.Builder()
.setArtworkUri(Uri.parse(getThumbnailUrl()))
.setArtworkUri(thumbnailUrl == null ? null : Uri.parse(thumbnailUrl))
.setArtist(getUploaderName())
.setDescription(getTitle())
.setDisplayTitle(getTitle())