From d18275cd7a848667ff7372f2e0060d0fbad8e354 Mon Sep 17 00:00:00 2001
From: Supositware <sup@libtar.de>
Date: Sun, 22 Sep 2024 01:04:27 +0200
Subject: [PATCH] reverse playlist so it download the right video on twitter
 quotes

---
 utils/videos.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/videos.js b/utils/videos.js
index a0ebfbd..08b9041 100644
--- a/utils/videos.js
+++ b/utils/videos.js
@@ -15,7 +15,7 @@ export default {
 };
 async function downloadVideo(urlArg, output, format = `bestvideo[height<=?${ytdlpMaxResolution}]+bestaudio/best`) {
 	await new Promise((resolve, reject) => {
-		const options = ['-f', format, urlArg, '-o', `${os.tmpdir()}/${output}.%(ext)s`, '--force-overwrites', '--no-playlist', '--remux-video=mp4/webm/mov', '--no-warnings'];
+		const options = ['-f', format, urlArg, '-o', `${os.tmpdir()}/${output}.%(ext)s`, '--force-overwrites', '--playlist-reverse', '--no-playlist', '--remux-video=mp4/webm/mov', '--no-warnings'];
 		if (proxy) {
 			options.push('--proxy');
 			options.push(proxy);