[del] bad path

This commit is contained in:
Knah Tsaeb 2013-07-26 15:53:14 +02:00
parent 3f38ac2014
commit 2ca54d0437

View file

@ -1,31 +0,0 @@
#!/bin/bash/
finalDest=/srv/http/mytube.local/videos/
tempDest=/srv/http/mytube.local/tmp/
threads=3 # nb cpu core - 1
cd $tempDest
nbProcessLauch=$(ps -e | grep -v grep | grep youtube-dl | wc -l)
if [ $nbProcessLauch != 0 ]
then
echo 'bye'
exit
fi
for file in $tempDest*.hash
do
if [[ -f $file ]];
then
while read urlHash url destination
do
youtube-dl -R 0 -q -c --write-thumbnail --write-info-json --recode-video webm --no-check-certificate -f 46/37/45/22/44/35/34/5 -o "$urlHash.%(ext)s" "$url"
sleep 5
if [ ! -f $urlHash.*.part ]
then
rm $file
sleep 1
mv $urlHash* $finalDest$destination
fi
done < $file
fi
done