account for new urls
This commit is contained in:
@@ -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) => {
|
||||
|
@@ -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>>();
|
||||
|
Reference in New Issue
Block a user