about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-09-17 18:13:05 +0200
committerSoispha <soispha@vhack.eu>2023-09-17 18:18:00 +0200
commitaf1dc597fac430ce25851d35ae3d4b04a5ce2834 (patch)
tree8b3a3fcd723bb546fd5a1360237302a4a151129a
parentchore(version): v1.13.0 (diff)
downloadnixos-config-af1dc597fac430ce25851d35ae3d4b04a5ce2834.tar.gz
nixos-config-af1dc597fac430ce25851d35ae3d4b04a5ce2834.zip
fix(hm/pkgs/scrs/wrappers/yti): Rework to today's standards
Diffstat (limited to '')
-rwxr-xr-xhm/soispha/pkgs/scripts/wrappers/spodi2
-rwxr-xr-xhm/soispha/pkgs/scripts/wrappers/yti12
2 files changed, 6 insertions, 8 deletions
diff --git a/hm/soispha/pkgs/scripts/wrappers/spodi b/hm/soispha/pkgs/scripts/wrappers/spodi
index c8fa56de..63eac98e 100755
--- a/hm/soispha/pkgs/scripts/wrappers/spodi
+++ b/hm/soispha/pkgs/scripts/wrappers/spodi
@@ -3,7 +3,7 @@
 # shellcheck source=/dev/null
 SHELL_LIBRARY_VERSION="1.4.2" . %SHELL_LIBRARY_PATH
 
-DOWN_DIR="/home/soispha/media/music/down";
+DOWN_DIR="/home/soispha/media/music/down/spotify";
 
 download_url="$1";
 
diff --git a/hm/soispha/pkgs/scripts/wrappers/yti b/hm/soispha/pkgs/scripts/wrappers/yti
index 8be3777f..928ba4ca 100755
--- a/hm/soispha/pkgs/scripts/wrappers/yti
+++ b/hm/soispha/pkgs/scripts/wrappers/yti
@@ -3,14 +3,12 @@
 # shellcheck source=/dev/null
 SHELL_LIBRARY_VERSION="1.4.2" . %SHELL_LIBRARY_PATH
 
-die "Use spodi instead!" # TODO: fix this script
-DOWN_DIR=/home/soispha/media/playlist/down/
-
+DOWN_DIR=/home/soispha/media/music/down/youtube
 
 tmp=$(mktmp)
 config=$(mktmp)
 
-for e in "$DOWN_DIR"/*.mp3;do echo "$e" >> "$tmp";done
+for e in "$DOWN_DIR"/*.opus;do echo "$e" >> "$tmp";done
 [ "$(wc -l "$tmp" | awk '{print $1}')" -gt 2 ] && die "something is already downloaded"
 
 cat << EO > "$config"
@@ -28,9 +26,9 @@ cat << EO > "$config"
 EO
 
 
-rm ${DOWN_DIR}yt-dlp.log
-cd $DOWN_DIR || die "BUG: no $DOWN_DIR"
+rm "$DOWN_DIR/yt-dlp.log"
+cd "$DOWN_DIR" || die "BUG: no $DOWN_DIR"
 
-unbuffer yt-dlp --config-location "$config" "$1" | tee $DOWN_DIR/yt-dlp.log
+unbuffer yt-dlp --config-location "$config" "$1" | tee "$DOWN_DIR/yt-dlp.log"
 
 # vim: ft=sh