Minor fixes

- Avoid queue when fetching lyrics id
- Better error handling for logout
This commit is contained in:
Shiny Nematoda 2023-04-07 16:24:11 +00:00
parent 08da12fa67
commit 580c1b7b46
No known key found for this signature in database
GPG key ID: 367DA4C64DF057AD
4 changed files with 17 additions and 9 deletions

View file

@ -27,11 +27,11 @@ function get() {
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(
({ lyricsId }) => {
if (lyricsId) set(lyricsId);
},
);
getJsonHyp(
'/next/' + data.state.url.replace('/watch?v=', '') + '?queue=avoid',
).then(({ lyricsId }) => {
if (lyricsId) set(lyricsId);
});
}
}