Replace youtube-dl packages with a manual recipe
authorSiraaj Khandkar <siraaj@khandkar.net>
Wed, 22 Jun 2022 03:18:04 +0000 (23:18 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Wed, 22 Jun 2022 03:18:41 +0000 (23:18 -0400)
deps/youtube-dl/Makefile [new file with mode: 0644]
home/lib/login_functions.sh
pkgs-pip.list
pkgs-void.list

diff --git a/deps/youtube-dl/Makefile b/deps/youtube-dl/Makefile
new file mode 100644 (file)
index 0000000..fe4c509
--- /dev/null
@@ -0,0 +1,3 @@
+all:
+       curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
+       chmod a+rx /usr/local/bin/youtube
index 6133181..3a21209 100644 (file)
@@ -342,14 +342,15 @@ _yt() {
     local -r uri="$2"
     local -r opts="$3"
 
-    local -r id=$(youtube-dlc --get-id "$uri")
-    local -r title=$(youtube-dlc --get-title "$uri" | sed 's/[^А-Яа-яA-Za-z0-9._-]/_/g')
+    local -r yt=youtube-dl
+    local -r id=$("$yt" --get-id "$uri")
+    local -r title=$("$yt" --get-title "$uri" | sed 's/[^А-Яа-яA-Za-z0-9._-]/_/g')
     local -r dir="${base_dir}/${title}--${id}"
 
     mkdir -p "$dir"
     cd "$dir" || kill -INT $$
     echo "$uri" > 'uri'
-    youtube-dlc $opts -c --write-all-thumbnails --write-description --write-info-json "$uri"
+    "$yt" $opts -c --write-all-thumbnails --write-description --write-info-json "$uri"
 }
 
 yt_audio() {
index dc6332a..03e3f0b 100644 (file)
@@ -1,5 +1,4 @@
 #
 twtxt
-youtube-dlc
 terminal-colors
 liquidctl
index 7718b69..964f2c7 100644 (file)
@@ -366,7 +366,6 @@ xsv                     # CLI CSV tool
 xtools
 xwininfo                # Needed for picom-trans to work, but isn't a dep of picom.
 yajl-dbg
-youtube-dl
 zathura
 zathura-djvu
 zathura-pdf-mupdf
This page took 0.033465 seconds and 4 git commands to generate.