format and add sponsorblock

Amolith created

Change summary

dot_local/bin/executable_youtube | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

Detailed changes

dot_local/bin/executable_youtube 🔗

@@ -1,25 +1,25 @@
 #!/usr/bin/env sh
 
 if [ ! -d "$HOME/Bulk/Media/YouTube/.archives" ]; then
-    mkdir -p "$i"
+    mkdir -p "$HOME/Bulk/Media/YouTube/.archives"
 fi
 
 cd "$HOME/Bulk/Media/YouTube" || exit 1
 
-dl () {
+dl() {
     MOD_DATE=$(stat -c %y .archives/"$NAME".txt | awk -F ' ' '{print $1}' | sed 's/-//g')
 
-    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                                           \
+    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 \
+        --sponsorblock-mark sponsor,intro,outro,self-promo,preview,interaction,chapter \
         -o "%(uploader)s/%(upload_date)s - %(title)s (%(duration)s).%(ext)s" \
         --playlist-end 5 "$URL"
     sleep 5
 }
 
-
 while read -r NAME URL; do
     echo "Downloading videos from $NAME"
     dl "$NAME" "$URL"