This commit is contained in:
fred 2022-09-15 14:17:43 +02:00
parent 69c46d4f36
commit 6c4222ab6a
1 changed files with 2 additions and 2 deletions

View File

@ -42,9 +42,9 @@ for yurl in $(cat ~/.zen/tmp/tiddlers.json | jq -r '.[].text' | grep 'http'); do
# Get last writen file... TODO: Could we do better ?
ZFILE=$(ls -t ~/.zen/tmp/tube/*.mp4 | head -n 1)
# ZFILE=$(ls -t ~/.zen/tmp/tube/*.mp4 | head -n 1)
TITLE=$(yt-dlp --print title ${yurl})
ZFILE="$TITLE.mp4"
ZFILE=$(ls ~/.zen/tmp/tube/$TITLE* | head -n 1)
[[ ! -f ~/.zen/tmp/tube/$ZFILE ]] && echo "No FILE -- EXIT --" && exit 1
echo "~/.zen/tmp/tube/$ZFILE downloaded"