Delete remote playlists

+ minor ui changes
This commit is contained in:
Shiny Nematoda 2023-04-16 09:59:47 +00:00
parent 33fc79a736
commit fb121317ee
No known key found for this signature in database
GPG key ID: 367DA4C64DF057AD
9 changed files with 62 additions and 16 deletions

View file

@ -4,7 +4,7 @@ import { defineStore } from 'pinia';
import { useNav } from '@/stores/misc.js';
import { getJsonPiped, getJsonHyp, getJsonAuth } from '@/scripts/fetch.js';
import { useRoute } from '@/scripts/util.js';
import { useVerifyAuth, useRoute } from '@/scripts/util.js';
export const useResults = defineStore('results', () => {
const items = ref({}),
@ -39,10 +39,7 @@ export const useResults = defineStore('results', () => {
async function getAlbum(e) {
const hash = new URLSearchParams(e.substring(e.indexOf('?'))).get('list'),
isAuth =
/[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}/.test(
hash,
),
isAuth = useVerifyAuth(hash),
path = '/playlists/' + hash,
json = isAuth ? await getJsonAuth(path) : await getJsonPiped(path);