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) {
|
||||
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>>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue