[web] Fix display of search results for composer and playlist

This commit is contained in:
chme 2022-04-17 07:48:58 +02:00
parent 45b192255a
commit 42e708fbb4

View File

@ -131,7 +131,7 @@
<p class="title is-4">Composers</p> <p class="title is-4">Composers</p>
</template> </template>
<template #content> <template #content>
<list-composers :composers="composers.items" /> <list-composers :composers="composers" />
</template> </template>
<template #footer> <template #footer>
<nav v-if="show_all_composers_button" class="level"> <nav v-if="show_all_composers_button" class="level">
@ -139,7 +139,7 @@
<a <a
class="button is-light is-small is-rounded" class="button is-light is-small is-rounded"
@click="open_search_composers" @click="open_search_composers"
>Show all {{ composers.total }} composers</a >Show all {{ composers.total.toLocaleString() }} composers</a
> >
</p> </p>
</nav> </nav>
@ -157,7 +157,7 @@
<p class="title is-4">Playlists</p> <p class="title is-4">Playlists</p>
</template> </template>
<template #content> <template #content>
<list-playlists :playlists="playlists.items" /> <list-playlists :playlists="playlists" />
</template> </template>
<template #footer> <template #footer>
<nav v-if="show_all_playlists_button" class="level"> <nav v-if="show_all_playlists_button" class="level">
@ -264,8 +264,8 @@ export default {
tracks: { items: [], total: 0 }, tracks: { items: [], total: 0 },
artists: new GroupByList(), artists: new GroupByList(),
albums: new GroupByList(), albums: new GroupByList(),
composers: { items: [], total: 0 }, composers: new GroupByList(),
playlists: { items: [], total: 0 }, playlists: new GroupByList(),
audiobooks: new GroupByList(), audiobooks: new GroupByList(),
podcasts: new GroupByList() podcasts: new GroupByList()
} }
@ -396,12 +396,8 @@ export default {
this.tracks = data.tracks ? data.tracks : { items: [], total: 0 } this.tracks = data.tracks ? data.tracks : { items: [], total: 0 }
this.artists = new GroupByList(data.artists) this.artists = new GroupByList(data.artists)
this.albums = new GroupByList(data.albums) this.albums = new GroupByList(data.albums)
this.composers = data.composers this.composers = new GroupByList(data.composers)
? data.composers this.playlists = new GroupByList(data.playlists)
: { items: [], total: 0 }
this.playlists = data.playlists
? data.playlists
: { items: [], total: 0 }
}) })
}, },