mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-16 03:45:14 +00:00
api/twitter: fix gifs having a wrong file extension in a picker
Some checks failed
Run service tests / test service functionality (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
Some checks failed
Run service tests / test service functionality (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
This commit is contained in:
parent
eab37ae7ff
commit
c33017283d
|
@ -208,7 +208,7 @@ export default async function({ id, index, toGif, dispatcher, alwaysProxy }) {
|
||||||
|
|
||||||
let url = bestQuality(content.video_info.variants);
|
let url = bestQuality(content.video_info.variants);
|
||||||
const shouldRenderGif = content.type === "animated_gif" && toGif;
|
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";
|
let type = "video";
|
||||||
if (shouldRenderGif) type = "gif";
|
if (shouldRenderGif) type = "gif";
|
||||||
|
|
Loading…
Reference in a new issue