mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
code cleanup
This commit is contained in:
7
torrent
7
torrent
@@ -9,10 +9,11 @@ c_reset="\033[0m"
|
||||
down(){
|
||||
tput reset
|
||||
notify-send "Torrent: Downloading"
|
||||
aria2c -d movies --select-file=$2 --seed-time=0 $1 && notify-send "Torrent: Download complete" && rm -f $file || notify-send -u critical "Torrent: Error!!" }
|
||||
aria2c -d movies --select-file=$2 --seed-time=0 $1 && notify-send "Torrent: Download complete" && rm -f $file || notify-send -u critical "Torrent: Error!!"
|
||||
}
|
||||
|
||||
trap "rm -f $HOME/.cache/*.torrent;exit 0" INT HUP
|
||||
[ -z "$*" ] && magnet=$(xclip -out clipboard) || magnet=$*
|
||||
[ -z "$*" ] && magnet="$(xclip -out clipboard)" || magnet="$*"
|
||||
echo "$magnet"
|
||||
printf "${c_yellow}Download>>\n${c_green}[f]ull torrent\n${c_cyan}[p]artial torrent \n${c_red}[q]uit"
|
||||
printf "${c_reset}\n\tenter choice:"
|
||||
@@ -29,5 +30,5 @@ case $ch in
|
||||
down "$HOME/.cache/*.torrent" "$ind"
|
||||
rm -f $HOME/.cache/*.torrent;;
|
||||
q)
|
||||
break;;
|
||||
exit 0;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user