split configs into two systems...
This commit is contained in:
21
workstation/scripts/chat-dl.sh
Executable file
21
workstation/scripts/chat-dl.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p bash yt-dlp
|
||||
|
||||
minutes=10
|
||||
time_alive=60
|
||||
sleep_time=$((minutes * 60))
|
||||
loops=$((time_alive / (sleep_time / time_alive)))
|
||||
url="https://chaturbate.com/$1"
|
||||
|
||||
save_dir=/mnt/disk2/glue/Tuhmayto
|
||||
if [ ! -d "$save_dir" ]; then
|
||||
mkdir -p "$save_dir"
|
||||
fi
|
||||
cd $save_dir || exit
|
||||
|
||||
for i in $(seq 1 1 "$loops"); do
|
||||
waiting_time=$(((i * sleep_time) / time_alive))
|
||||
yt-dlp --hls-use-mpegts --prefer-ffmpeg -o '%(title)s.%(ext)s' "$url"
|
||||
echo "sleeping for $sleep_time seconds… been waiting for $waiting_time minutes"
|
||||
sleep $sleep_time
|
||||
done
|
||||
Reference in New Issue
Block a user