Fixed another missing NoneType-check that caused a crash.
This commit is contained in:
parent
971ead90c1
commit
9ae1704e4a
1 changed files with 8 additions and 3 deletions
|
@ -71,17 +71,22 @@ class TrackInfo(QToolBar):
|
||||||
self.artist.setText(f"By {artist}")
|
self.artist.setText(f"By {artist}")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.artist.setText("No Artist")
|
self.artist.setText("")
|
||||||
|
|
||||||
if album is not None and not album == "":
|
if album is not None and not album == "":
|
||||||
self.album.setText(f"In {album}")
|
self.album.setText(f"In {album}")
|
||||||
|
|
||||||
else:
|
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
|
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)
|
self.track_cover.setPixmap(self.wobuzz_logo)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue