sort genres by most albums
This commit is contained in:
parent
f11add00d9
commit
e077fabdca
@ -6,7 +6,7 @@
|
|||||||
:title="item.name">
|
:title="item.name">
|
||||||
<template #text>
|
<template #text>
|
||||||
<strong>{{ item.albumCount }}</strong> albums •
|
<strong>{{ item.albumCount }}</strong> albums •
|
||||||
<strong>{{ item.songCount }}</strong> songs
|
<strong>{{ item.trackCount }}</strong> tracks
|
||||||
</template>
|
</template>
|
||||||
</Tile>
|
</Tile>
|
||||||
</Tiles>
|
</Tiles>
|
||||||
|
@ -109,9 +109,10 @@ export class API {
|
|||||||
.map((item: any) => ({
|
.map((item: any) => ({
|
||||||
id: item.value,
|
id: item.value,
|
||||||
name: item.value,
|
name: item.value,
|
||||||
...item,
|
albumCount: item.albumCount,
|
||||||
|
trackCount: item.songCount,
|
||||||
}))
|
}))
|
||||||
.sort((a: any, b:any) => a.name.localeCompare(b.name))
|
.sort((a: any, b:any) => b.albumCount - a.albumCount)
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAlbumsByGenre(id: string) {
|
async getAlbumsByGenre(id: string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user