From 7b48cd2a775e21e7a03f0ca8959059ba109eae1b Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Mon, 20 Jun 2022 21:44:23 +0200 Subject: [PATCH] Make sure tracks with no cover art can be played (#393) --- app/src/main/java/me/vanpetegem/accentor/media/MusicService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/me/vanpetegem/accentor/media/MusicService.kt b/app/src/main/java/me/vanpetegem/accentor/media/MusicService.kt index 0c8d2e49..65f0be29 100644 --- a/app/src/main/java/me/vanpetegem/accentor/media/MusicService.kt +++ b/app/src/main/java/me/vanpetegem/accentor/media/MusicService.kt @@ -181,7 +181,7 @@ class MusicService : MediaSessionService() { .setArtist(track.stringifyTrackArtists()) .setAlbumTitle(album.title) .setAlbumArtist(album.stringifyAlbumArtists().let { if (it.isEmpty()) application.getString(R.string.various_artists) else it }) - .setArtworkUri(Uri.parse(album.image500)) + .setArtworkUri(album.image500?.let { Uri.parse(it) }) .setTrackNumber(track.number) .setReleaseYear(album.release.year) .setReleaseMonth(album.release.monthValue)