some bug fixes

- watch route params instead of route object in folderview
- move to script setup on album view
- use album as a reactive object instead of refs
- use axios instead of fetch to get album data
- improve clickable areas on songItem
- move album requests to POST
This commit is contained in:
geoffrey45
2022-03-01 19:46:37 +03:00
parent 8459310258
commit 6efbb47166
17 changed files with 229 additions and 183 deletions
+6 -5
View File
@@ -5,24 +5,25 @@ import state from "./state.js";
async function toAlbum(title, artist) {
console.log("routing to album");
state.loading.value = true;
await album
.getAlbumTracks(title, artist)
.then((data) => {
state.album_song_list.value = data.songs;
state.album_info.value = data.info;
state.album.tracklist = data.songs;
state.album.info = data.info;
})
.then(
await album.getAlbumArtists(title, artist).then((data) => {
state.album_artists.value = data;
state.album.artists = data;
})
)
.then(
album.getAlbumBio(title, artist).then((data) => {
if (data === "None") {
state.album_bio.value = null;
state.album.bio = null;
} else {
state.album_bio.value = data;
state.album.bio = data;
}
})
)