improve youtube script

Amolith created

Change summary

dot_local/bin/executable_youtube | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Detailed changes

dot_local/bin/executable_youtube 🔗

@@ -7,15 +7,15 @@ fi
 cd "$HOME/Bulk/Media/YouTube" || exit 1
 
 dl () {
-    MOD_DATE=$(stat -c %y $NAME | awk -F ' ' '{print $1}' | sed 's/-//g')
+    MOD_DATE=$(stat -c %y .archives/"$NAME".txt | awk -F ' ' '{print $1}' | sed 's/-//g')
 
-    yt-dlp --download-archive .archives/"$1".txt -f                          \
+    yt-dlp --download-archive .archives/"$NAME".txt -f                          \
         'bestvideo[height<=2160]+bestaudio'                                  \
         --dateafter "$MOD_DATE" --write-sub                                  \
         --write-auto-sub --sub-format srt/best                               \
         --sub-lang en --embed-subs                                           \
         -o "%(uploader)s/%(upload_date)s - %(title)s (%(duration)s).%(ext)s" \
-        --playlist-end 5 "$2"
+        --playlist-end 5 "$URL"
     sleep 5
 }