about summary refs log tree commit diff stats
path: root/sys/nixpkgs/pkgs/scripts/source/wrappers/spodi.sh
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-03-23 20:48:36 +0100
committerSoispha <soispha@vhack.eu>2024-03-23 20:48:36 +0100
commit73cb8c56c72de9dc4e3cc69ea82bde3964632564 (patch)
tree89bde6999b26afd4a4ae62bc4be2f3ac2f5a2c59 /sys/nixpkgs/pkgs/scripts/source/wrappers/spodi.sh
parentfeat(pkgs/scripts/fupdate): Add support for updating without running the script (diff)
downloadnixos-config-73cb8c56c72de9dc4e3cc69ea82bde3964632564.tar.gz
nixos-config-73cb8c56c72de9dc4e3cc69ea82bde3964632564.zip
feat(pkgs/scripts/spodi): Rewrite to support artist `update`
Diffstat (limited to '')
-rwxr-xr-xsys/nixpkgs/pkgs/scripts/source/wrappers/spodi.sh55
1 files changed, 0 insertions, 55 deletions
diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/spodi.sh b/sys/nixpkgs/pkgs/scripts/source/wrappers/spodi.sh
deleted file mode 100755
index 09b932ce..00000000
--- a/sys/nixpkgs/pkgs/scripts/source/wrappers/spodi.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env dash
-
-# shellcheck source=/dev/null
-SHELL_LIBRARY_VERSION="2.1.1" . %SHELL_LIBRARY_PATH
-
-# This path must not contain spaces
-DOWN_DIR="/home/soispha/media/music/down/spotify"
-
-download_url="$1"
-
-already_downloaded_files="$(mktmp)"
-fd . "$DOWN_DIR" --exclude spotdl.log --exclude spotdl-errors.log >"$already_downloaded_files"
-
-config="$(mktmp)"
-cat <<EOF | clean >"$config"
-# Main options
---audio slider-kz bandcamp youtube-music piped youtube soundcloud
---lyrics genius musixmatch azlyrics synced
-
-# FFmpeg options
---ffmpeg ffmpeg
---threads 16
---bitrate 256k
-
-# Spotify options
---cache-path /home/soispha/.cache/spotdl/.spotipy
-
-# Output options
---preload
---format opus
---output {artists}_-_{title}
---print-errors
---save-errors $DOWN_DIR/spotdl-errors.log
-# TODO: Reactive whence spotdl support for these has improved <2023-12-19>
-# --generate-lrc
---overwrite skip
-
-# Misc options
---log-level INFO
-EOF
-
-if [ -z "$NO_CHECK" ] && [ "$(wc -l <"$already_downloaded_files")" -ne 0 ]; then
-    die "something is already downloaded"
-fi
-
-rm "$DOWN_DIR/spotdl.log"
-cd "$DOWN_DIR" || die "BUG: no $DOWN_DIR"
-touch "$DOWN_DIR/spotdl-errors.log"
-
-# The sub shell needs to be unquoted, as the arguments may not be treated as one.
-# shellcheck disable=2046
-unbuffer spotdl $(cat "$config") download "$download_url" | tee "$DOWN_DIR/spotdl.log"
-
-[ -d ~/.spotdl ] && rm -r ~/.spotdl
-# vim: ft=sh