From 9ae1704e4aad8b8020a440831addb1953ec51ae1 Mon Sep 17 00:00:00 2001 From: The Wobbler Date: Wed, 5 Mar 2025 16:51:50 +0100 Subject: [PATCH] Fixed another missing NoneType-check that caused a crash. --- wobuzz/ui/track_info.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/wobuzz/ui/track_info.py b/wobuzz/ui/track_info.py index 41dd515..0be8010 100644 --- a/wobuzz/ui/track_info.py +++ b/wobuzz/ui/track_info.py @@ -71,17 +71,22 @@ class TrackInfo(QToolBar): self.artist.setText(f"By {artist}") else: - self.artist.setText("No Artist") + self.artist.setText("") if album is not None and not album == "": self.album.setText(f"In {album}") else: - self.album.setText("No Album") + self.album.setText("") + + if current_track.metadata.images is None: # can't display cover image when there are no images at all + self.track_cover.setPixmap(self.wobuzz_logo) + + return cover = current_track.metadata.images.any - if cover is None: + if cover is None: # can't display cover image when there is none self.track_cover.setPixmap(self.wobuzz_logo) return