|
|
|
@ -1,14 +1,18 @@ |
|
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
DEST="/output" |
|
|
|
|
|
|
|
|
|
INTERVAL="43200" #12h |
|
|
|
|
INTERVAL="3600" #1h |
|
|
|
|
START_TIME="$(date +%s)" |
|
|
|
|
|
|
|
|
|
function listChannels { |
|
|
|
|
SRC="/etc/videolist.txt" |
|
|
|
|
grep -Ev "^#|^$" "$SRC" | sed 's/#.*$//' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function timeRunning { |
|
|
|
|
expr $(date +%s) - $START_TIME |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function main { |
|
|
|
|
init |
|
|
|
|
curl https://ipinfo.io |
|
|
|
@ -28,8 +32,7 @@ function doDownload { |
|
|
|
|
for CHANNEL in $(listChannels); do |
|
|
|
|
echo "downloading $CHANNEL" |
|
|
|
|
HOME="$DEST" yt-dlp --config-location /etc/youtube-dl.conf $CHANNEL |
|
|
|
|
echo "sleeping 10s" |
|
|
|
|
sleep 10 |
|
|
|
|
sleep 1 |
|
|
|
|
done |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|