Improve youtube-dl
Read: work around its retardation
This commit is contained in:
12
konata.sh
12
konata.sh
@@ -71,9 +71,15 @@ mp3(){
|
|||||||
tmp="/tmp/mp3"
|
tmp="/tmp/mp3"
|
||||||
[ -d $tmp ] && mkdir $tmp
|
[ -d $tmp ] && mkdir $tmp
|
||||||
sendmsg "Downloading, this might take a while..."
|
sendmsg "Downloading, this might take a while..."
|
||||||
youtube-dl --add-metadata --metadata-from-title "%(artist)s - %(title)s" -x --audio-format mp3 -o "$tmp/%(title)s.%(ext)s" "$args"
|
youtube-dl -f 140 --max-filesize 50M -o "$tmp/%(title)s.%(ext)s" "$args"
|
||||||
sendfile "$tmp/$(ls $tmp)"
|
rm $tmp/*.part
|
||||||
rm $tmp/*
|
if [ -f $tmp/* ]
|
||||||
|
then
|
||||||
|
sendfile "$tmp/$(ls $tmp)"
|
||||||
|
rm $tmp/*
|
||||||
|
else
|
||||||
|
sendmsg "I couldn't download this file. Perhaps it's too large?"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
stat(){
|
stat(){
|
||||||
|
Reference in New Issue
Block a user