fix: uamp failing when input is null

+ update deps
This commit is contained in:
Shiny Nematoda 2024-06-13 19:12:44 +00:00
parent 94011d1b8a
commit fd246644c1
3 changed files with 725 additions and 715 deletions

1428
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -11,17 +11,17 @@
}, },
"dependencies": { "dependencies": {
"bootstrap-icons": "^1.11.3", "bootstrap-icons": "^1.11.3",
"dompurify": "^3.1.4", "dompurify": "^3.1.5",
"peerjs": "^1.5.4", "peerjs": "^1.5.4",
"pinia": "^2.1.7", "pinia": "^2.1.7",
"shaka-player": "^4.8.5", "shaka-player": "^4.9.4",
"sortablejs": "^1.15.2", "sortablejs": "^1.15.2",
"vue": "^3.2.38" "vue": "^3.2.38"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^5.0.4", "@vitejs/plugin-vue": "^5.0.5",
"prettier": "^3.2.5", "prettier": "^3.3.2",
"vite": "^5.2.11", "vite": "^5.3.0",
"vite-plugin-pwa": "^0.20.0" "vite-plugin-pwa": "^0.20.0"
} }
} }

View file

@ -23,7 +23,7 @@ export const useData = defineStore('data', () => {
async function getSong(e) { async function getSong(e) {
const hash = new URLSearchParams(e.substring(e.indexOf('?'))).get('v'), const hash = new URLSearchParams(e.substring(e.indexOf('?'))).get('v'),
json = await getJsonPiped('/streams/' + hash), json = await getJsonPiped('/streams/' + hash),
unamp = txt => txt.replace(AMP, '&'); unamp = txt => txt?.replace(AMP, '&');
state.art = unamp(json.thumbnailUrl); state.art = unamp(json.thumbnailUrl);
state.description = json.description; state.description = json.description;