account for new urls
This commit is contained in:
parent
46ac5ec3ff
commit
16a785cd00
2 changed files with 4 additions and 1 deletions
|
@ -503,7 +503,7 @@ class MediaPlayer {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
} finally {
|
} finally {
|
||||||
output.filename = url.split("/").at(-1);
|
output.filename = new URL(url).pathname.split("/").at(-1);
|
||||||
prog.close();
|
prog.close();
|
||||||
if (!output.length) {
|
if (!output.length) {
|
||||||
output.length = new Promise<number>(async (res) => {
|
output.length = new Promise<number>(async (res) => {
|
||||||
|
|
|
@ -588,6 +588,9 @@ export async function getapiurls(str: string): Promise<
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function isAnimated(src: string) {
|
function isAnimated(src: string) {
|
||||||
|
try {
|
||||||
|
src = new URL(src).pathname;
|
||||||
|
} catch {}
|
||||||
return src.endsWith(".apng") || src.endsWith(".gif");
|
return src.endsWith(".apng") || src.endsWith(".gif");
|
||||||
}
|
}
|
||||||
const staticImgMap = new Map<string, string | Promise<string>>();
|
const staticImgMap = new Map<string, string | Promise<string>>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue