add spotify playlists to playlists count

This commit is contained in:
RemixDev 2021-12-29 18:45:48 +01:00
parent 1312594ef3
commit 004e0a99be

View File

@ -24,10 +24,10 @@
</button> </button>
<div v-show="activeTab === 'playlist'"> <div v-show="activeTab === 'playlist'">
<div v-if="playlists.length === 0"> <div v-if="(playlists.length + spotifyPlaylists.length) === 0">
<h1>{{ $t('favorites.noPlaylists') }}</h1> <h1>{{ $t('favorites.noPlaylists') }}</h1>
</div> </div>
<div v-if="playlists.length > 0 || spotifyPlaylists.length > 0" class="release-grid"> <div v-if="(playlists.length + spotifyPlaylists.length) > 0" class="release-grid">
<div v-for="release in playlists" :key="release.id" class="release"> <div v-for="release in playlists" :key="release.id" class="release">
<router-link :to="{ name: 'Playlist', params: { id: release.id } }" class="cursor-pointer" tag="div"> <router-link :to="{ name: 'Playlist', params: { id: release.id } }" class="cursor-pointer" tag="div">
<CoverContainer :cover="release.picture_medium" :link="release.link" is-rounded @click.stop="addToQueue" /> <CoverContainer :cover="release.picture_medium" :link="release.link" is-rounded @click.stop="addToQueue" />
@ -255,6 +255,7 @@ export default defineComponent({
switch (tab) { switch (tab) {
case 'playlist': case 'playlist':
toDownload = this.playlists toDownload = this.playlists
toDownload += this.spotifyPlaylists
break break
case 'album': case 'album':
toDownload = this.albums toDownload = this.albums