From 173cf770544b512a04806fadff5a4e720fc3161d Mon Sep 17 00:00:00 2001 From: Artem Anufrij Date: Tue, 12 Sep 2023 20:24:31 +0200 Subject: [PATCH] show radio dummy icon in the player bar --- src/components/Player.vue | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/components/Player.vue b/src/components/Player.vue index e2ab53f..8977b9d 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -17,11 +17,7 @@
@@ -182,7 +178,7 @@ export default { this.audio.src = url; this.pushHistoryItem(); - + // Try to fix SAFARI this.audio.play(); }, @@ -310,6 +306,27 @@ export default { }, }, computed: { + cover() { + if (this.selectedTrack.title != "") { + let res = "/static/icons/dummy/album.svg"; + + if (this.selectedTrack.parent.covers.cover64) { + res = this.selectedTrack.parent.covers.cover64; + } + + return res; + } + + if (this.selectedRadio) { + let res = "/static/icons/dummy/radio.svg"; + if (this.selectedRadio.cover64) { + res = this.selectedRadio.cover64; + } + return res; + } + + return ""; + }, selectedTrack() { return this.$store.getters["tracks/selectedTrack"]; },