Improve youtube-dl
Read: work around its retardation
This commit is contained in:
parent
6e3946229e
commit
d5db8cfb7a
12
konata.sh
12
konata.sh
@ -71,9 +71,15 @@ mp3(){
|
||||
tmp="/tmp/mp3"
|
||||
[ -d $tmp ] && mkdir $tmp
|
||||
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"
|
||||
sendfile "$tmp/$(ls $tmp)"
|
||||
rm $tmp/*
|
||||
youtube-dl -f 140 --max-filesize 50M -o "$tmp/%(title)s.%(ext)s" "$args"
|
||||
rm $tmp/*.part
|
||||
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(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user