account for new urls

This commit is contained in:
MathMan05 2025-05-07 10:20:29 -05:00
parent 46ac5ec3ff
commit 16a785cd00
2 changed files with 4 additions and 1 deletions

View file

@ -503,7 +503,7 @@ class MediaPlayer {
} catch (e) {
console.error(e);
} finally {
output.filename = url.split("/").at(-1);
output.filename = new URL(url).pathname.split("/").at(-1);
prog.close();
if (!output.length) {
output.length = new Promise<number>(async (res) => {

View file

@ -588,6 +588,9 @@ export async function getapiurls(str: string): Promise<
return false;
}
function isAnimated(src: string) {
try {
src = new URL(src).pathname;
} catch {}
return src.endsWith(".apng") || src.endsWith(".gif");
}
const staticImgMap = new Map<string, string | Promise<string>>();