mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 13:03:02 +00:00
show albums from artist at the bottom of album page
+ add a testing genres strip in album page + misc refactors
This commit is contained in:
committed by
Mungai Njoroge
parent
da852e72f3
commit
4a49d48011
@@ -4,8 +4,12 @@ import { ComputedRef } from "vue";
|
||||
import { AlbumDisc } from "./../../interfaces";
|
||||
|
||||
import { FuseTrackOptions } from "@/composables/enums";
|
||||
import { content_width } from "@/stores/content-width";
|
||||
|
||||
import { getAlbumTracks } from "../../composables/fetch/album";
|
||||
import {
|
||||
getAlbumsFromArtist,
|
||||
getAlbumTracks,
|
||||
} from "../../composables/fetch/album";
|
||||
import { AlbumInfo, Artist, FuseResult, Track } from "../../interfaces";
|
||||
import { useNotifStore } from "../notification";
|
||||
|
||||
@@ -49,6 +53,7 @@ export default defineStore("album", {
|
||||
info: <AlbumInfo>{},
|
||||
rawTracks: <Track[]>[],
|
||||
artists: <Artist[]>[],
|
||||
albumArtists: <{ artist: string; albums: AlbumInfo[] }[]>[],
|
||||
bio: null,
|
||||
}),
|
||||
actions: {
|
||||
@@ -62,9 +67,23 @@ export default defineStore("album", {
|
||||
this.rawTracks = album.tracks;
|
||||
this.info = album.info;
|
||||
},
|
||||
async fetchArtistAlbums() {
|
||||
const albumartist = this.info.albumartist;
|
||||
const cardWidth = 8 * 16;
|
||||
const visible_cards = Math.floor(content_width.value / cardWidth);
|
||||
|
||||
this.albumArtists = await getAlbumsFromArtist(
|
||||
albumartist,
|
||||
visible_cards,
|
||||
this.info.albumhash
|
||||
);
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = "";
|
||||
},
|
||||
resetAlbumArtists() {
|
||||
this.albumArtists = [];
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
discs(): Disc {
|
||||
|
||||
Reference in New Issue
Block a user