mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 05:08:00 +02:00
Minor fixes
- Avoid queue when fetching lyrics id - Better error handling for logout
This commit is contained in:
parent
08da12fa67
commit
580c1b7b46
4 changed files with 17 additions and 9 deletions
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,9 @@ async function setAuth(key) {
|
|||
|
||||
const res = await useAuthLogout();
|
||||
|
||||
if (res?.error) if (!confirm(`Got Error: ${res.error}. Continue?`)) return;
|
||||
if (!res && res?.error)
|
||||
if (!confirm(`Got Error ${res ? ': ' + res.error : ''}. Continue?`))
|
||||
return;
|
||||
}
|
||||
|
||||
store.removeItem('auth');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue