"See more" for albums and singles in artist page

This commit is contained in:
Shiny Nematoda 2023-03-24 10:34:26 +00:00
parent 9dd4534f83
commit 3f5abe967b
7 changed files with 81 additions and 85 deletions

View file

@ -13,23 +13,23 @@ const { t } = useI18n(),
source = ref(''),
status = ref(false);
function set(id) {
getJsonHyp('/lyrics/' + id).then(res => {
text.value = res.text;
source.value = res.source;
status.value = true;
});
}
function get() {
status.value = false;
const set = id => {
getJsonHyp('/browse/' + id).then(res => {
text.value = res.text;
source.value = res.source;
status.value = true;
});
};
if (data.state.lyrics && data.state.urls === data.state.url) {
set(data.state.lyrics);
} else if (data.state.url) {
getJsonHyp('/next/' + data.state.url.replace('/watch?v=', '')).then(
next => {
if (next.lyricsId) set(next.lyricsId);
({ lyricsId }) => {
if (lyricsId) set(lyricsId);
},
);
}