better ZFILE title extraction

This commit is contained in:
fred 2022-09-15 14:12:35 +02:00
parent 7007971f90
commit a7f38deda0
1 changed files with 1 additions and 0 deletions

View File

@ -43,6 +43,7 @@ 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="$(yt-dlp --print title ${yurl}).mp4"
[[ ! -f ~/.zen/tmp/tube/$ZFILE ]] && echo "No FILE -- EXIT --" && exit 1
echo "~/.zen/tmp/tube/$ZFILE downloaded"