api/twitter: fix gifs having a wrong file extension in a picker

This commit is contained in:
wukko 2024-10-13 09:59:52 +06:00
parent eab37ae7ff
commit c33017283d
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -208,7 +208,7 @@ export default async function({ id, index, toGif, dispatcher, alwaysProxy }) {
let url = bestQuality(content.video_info.variants);
const shouldRenderGif = content.type === "animated_gif" && toGif;
const videoFilename = `twitter_${id}_${i + 1}.mp4`;
const videoFilename = `twitter_${id}_${i + 1}.${shouldRenderGif ? "gif" : "mp4"}`;
let type = "video";
if (shouldRenderGif) type = "gif";