fix videoExists return

This commit is contained in:
Simon 2025-02-18 23:12:42 +07:00
parent 2703555723
commit c8382d1d7b
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -138,7 +138,7 @@ async function subscribe(url, subscribed) {
async function videoExists(id) { async function videoExists(id) {
const path = `api/video/${id}/`; const path = `api/video/${id}/`;
let response = await sendGet(path); let response = await sendGet(path);
if (!response.data) return false; if (response?.error) return false;
let access = await getAccess(); let access = await getAccess();
return new URL(`video/${id}/`, `${access.url}:${access.port}/`).href; return new URL(`video/${id}/`, `${access.url}:${access.port}/`).href;
} }