mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 13:08:01 +02:00
"See more" for albums and singles in artist page
This commit is contained in:
parent
9dd4534f83
commit
3f5abe967b
7 changed files with 81 additions and 85 deletions
|
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue