diff options
Diffstat (limited to '')
-rwxr-xr-x | hm/soispha/pkgs/scripts/wrappers/spodi | 2 | ||||
-rwxr-xr-x | hm/soispha/pkgs/scripts/wrappers/yti | 12 |
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 |