summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-02 09:02:36 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-02 09:02:36 +0900
commit5dd5b6e099c1b9deea197d89e1d889bd0392e860 (patch)
treec24002fd6a0e05f4d13a059df417520178bb5c15 /ar
parent7f4d82498cf80450a7d11cf3509566547f79961d (diff)
modified bin/qndl
Diffstat (limited to 'ar')
-rwxr-xr-xar/.local/bin/qndl8
1 files changed, 7 insertions, 1 deletions
diff --git a/ar/.local/bin/qndl b/ar/.local/bin/qndl
index 84c3dce..afcd16e 100755
--- a/ar/.local/bin/qndl
+++ b/ar/.local/bin/qndl
@@ -1,6 +1,12 @@
#!/bin/sh
-YTDL_CMD_BASE="yt-dlp --cookies-from-browser firefox:~/.mozilla/firefox --continue --embed-metadata --ignore-errors --no-force-overwrites --no-playlist --verbose"
+case "$BROWSER" in
+librewolf) cookies="librewolf:~/.librewolf" ;;
+firefox) cookies="firefox:~/.mozilla/firefox" ;;
+*) echo "⛔ Unsupported browser: $BROWSER" && exit 1 ;;
+esac
+
+YTDL_CMD_BASE="yt-dlp --cookies-from-browser $cookies --continue --embed-metadata --ignore-errors --no-force-overwrites --no-playlist --verbose"
# Process command-line options for download type
while getopts "mvr" opt; do