diff --git a/Makefile b/Makefile index 56901c5..4bbb387 100644 --- a/Makefile +++ b/Makefile @@ -1,28 +1,32 @@ export DOCKER_HOST := ssh://root@lstor1 +.PHONY: default deploy build_image restart stop run logs + default: deploy deploy: make build_image make stop - make run + make start build_image: docker build -t sneak/ytdlp . +restart: + make stop + make start + stop: -docker stop sneak-ytdlp -docker rm -f sneak-ytdlp -run: stop +start: docker run \ -d \ --name sneak-ytdlp \ -v /srv/lstor1/warez/youtube:/output \ --restart unless-stopped \ sneak/ytdlp - make logs logs: docker logs -f sneak-ytdlp - diff --git a/run.sh b/run.sh index fe84936..9613f9b 100644 --- a/run.sh +++ b/run.sh @@ -18,6 +18,9 @@ function main { curl https://ipinfo.io while true ; do doDownload + echo "finished." + echo "cleaning up" + find "$DEST" -type f -iname '*.temp.*' -print -delete echo "sleeping $INTERVAL" sleep $INTERVAL done diff --git a/youtube-dl.conf b/youtube-dl.conf index dc2c24e..c010e59 100644 --- a/youtube-dl.conf +++ b/youtube-dl.conf @@ -1,5 +1,10 @@ --download-archive "/output/archive.log" -i +--restrict-filenames +--mtime +--write-info-json +--write-comments +--trim-filenames 250 --add-metadata --all-subs --embed-subs