link to genre on album page

This commit is contained in:
Thomas Amland 2021-03-14 14:02:58 +01:00
parent 325f642d72
commit f609f7132b
2 changed files with 7 additions and 3 deletions

View File

@ -13,7 +13,11 @@
{{ album.artist }}
</router-link>
<span v-if="album.year"> {{ album.year }}</span>
<span v-if="album.genre"> {{ album.genre }}</span>
<span v-if="album.genreId">
<router-link :to="{name: 'genre', params: { id: album.genreId }}">
{{ album.genreId }}
</router-link>
</span>
</p>
<div class="text-nowrap">
<b-button variant="secondary" class="mr-2" @click="play">

View File

@ -29,7 +29,7 @@ export interface Album {
artistId: string
year: number
starred: boolean
genre?: string
genreId?: string
image?: string
tracks?: Track[]
}
@ -376,7 +376,7 @@ export class API {
image: this.getCoverArtUrl(item),
year: item.year || 0,
starred: !!item.starred,
genre: item.genre,
genreId: item.genre,
tracks: (item.song || []).map(this.normalizeTrack, this)
}
}