From b06597d9f247447431a8fac05c393d3e90f8d9d5 Mon Sep 17 00:00:00 2001 From: Roberto Tonino Date: Wed, 11 Aug 2021 11:50:25 +0200 Subject: [PATCH] fix: total number of playlists in download button --- src/components/pages/Favorites.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/pages/Favorites.vue b/src/components/pages/Favorites.vue index a8b25e5..fd738ae 100644 --- a/src/components/pages/Favorites.vue +++ b/src/components/pages/Favorites.vue @@ -273,9 +273,12 @@ export default defineComponent({ return toDownload }, getTabLength(tab = this.activeTab) { - const total = this[`${tab}s`]?.length - // TODO: Add Spotify playlists to downlaod queue as well - // if (tab === "playlist") total += this.spotifyPlaylists.length + let total = this[`${tab}s`]?.length + + if (tab === 'playlist') { + total += this.spotifyPlaylists.length + } + return total || 0 }, getLovedTracksPlaylist() {