mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
chore: using $TERMINAL variable in script
This commit is contained in:
4
ani-new
4
ani-new
@@ -8,9 +8,9 @@ down () {
|
|||||||
notify-send -i "$icon_dir/panel/jdownloader-indicator.svg" "Downloading $url" -r $tmp
|
notify-send -i "$icon_dir/panel/jdownloader-indicator.svg" "Downloading $url" -r $tmp
|
||||||
case $2 in
|
case $2 in
|
||||||
*m3u*)
|
*m3u*)
|
||||||
foot -e ffmpeg -loglevel error -stats -referer "$1" -user_agent "$agent" -i "$2" -c copy "$url.mp4" && notify-send "Episode Downloaded $url" -r $tmp || (notify-send -u "critical" "Downloading failed $url" -r $tmp && exit 0);;
|
$TERMINAL -e ffmpeg -loglevel error -stats -referer "$1" -user_agent "$agent" -i "$2" -c copy "$url.mp4" && notify-send "Episode Downloaded $url" -r $tmp || (notify-send -u "critical" "Downloading failed $url" -r $tmp && exit 0);;
|
||||||
*)
|
*)
|
||||||
foot -e aria2c -U "$agent" --check-certificate=false --summary-interval=0 -x 16 -s 16 --referer="$1" "$2" -o "$url.mp4" --download-result=hide && notify-send "Episode Downloaded $url" -r $tmp || (notify-send -u "critical" "Downloading failed $url" -r $tmp && exit 0);;
|
$TERMINAL -e aria2c -U "$agent" --check-certificate=false --summary-interval=0 -x 16 -s 16 --referer="$1" "$2" -o "$url.mp4" --download-result=hide && notify-send "Episode Downloaded $url" -r $tmp || (notify-send -u "critical" "Downloading failed $url" -r $tmp && exit 0);;
|
||||||
esac
|
esac
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|||||||
2
rss
2
rss
@@ -6,4 +6,4 @@ name=$(printf "%s" "$data" | sed -nE 's_^.*Please\] (.*)</title>.*size>(.*)</sub
|
|||||||
[ -z "$name" ] && notify-send -u critical "Err.. Query empty" -r $tmp && exit 0
|
[ -z "$name" ] && notify-send -u critical "Err.. Query empty" -r $tmp && exit 0
|
||||||
id=$(printf "$name" | sed -nE 's/.*\[(.*)\].*/\1/p')
|
id=$(printf "$name" | sed -nE 's/.*\[(.*)\].*/\1/p')
|
||||||
magnet=$(printf "%s" "$data" | sed -nE "s_.*<link>(.*$id.*)</link>.*_\1_p" | sed 's/amp;//g')
|
magnet=$(printf "%s" "$data" | sed -nE "s_.*<link>(.*$id.*)</link>.*_\1_p" | sed 's/amp;//g')
|
||||||
setsid -f foot -e $HOME/repos_scripts/torrent "$magnet"
|
setsid -f $TERMINAL -e $HOME/repos_scripts/torrent "$magnet"
|
||||||
|
|||||||
2
tor-bay
2
tor-bay
@@ -22,4 +22,4 @@ name_seed=$(printf "%s" "$data" | sed -nE 's/.*name":"(.*)","info_hash.*seeders"
|
|||||||
sel=$(display "$size" "$name_seed" | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 25 -p "select torrent >" | cut -d" " -f3-)
|
sel=$(display "$size" "$name_seed" | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 25 -p "select torrent >" | cut -d" " -f3-)
|
||||||
[ -z "$sel" ] && notify-send -u critical "No Torrent Selected" -r $tmp && exit 0 || notify-send "Selected $sel" -r $tmp
|
[ -z "$sel" ] && notify-send -u critical "No Torrent Selected" -r $tmp && exit 0 || notify-send "Selected $sel" -r $tmp
|
||||||
magnet="magnet:?xt=urn:btih:$(printf "%s" "$data" | sed -nE 's/.*name":"(.*)","info_hash":"(.*)",.*leech.*/\2\t\1/p' | sed -n "s/\t$sel//p")"
|
magnet="magnet:?xt=urn:btih:$(printf "%s" "$data" | sed -nE 's/.*name":"(.*)","info_hash":"(.*)",.*leech.*/\2\t\1/p' | sed -n "s/\t$sel//p")"
|
||||||
setsid -f foot -e $HOME/repos_scripts/torrent "$magnet"
|
setsid -f $TERMINAL -e $HOME/repos_scripts/torrent "$magnet"
|
||||||
|
|||||||
2
tor-cli
2
tor-cli
@@ -34,4 +34,4 @@ url=$(head -n $LINE $cachedir/links.bw | tail -n +$LINE)
|
|||||||
|
|
||||||
# Requesting page for magnet link
|
# Requesting page for magnet link
|
||||||
magnet=$(curl -s "${baseurl}${url}" | sed -nE 's/.*class="(.*)" href="([^"]*)" .*/\2/p')
|
magnet=$(curl -s "${baseurl}${url}" | sed -nE 's/.*class="(.*)" href="([^"]*)" .*/\2/p')
|
||||||
setsid -f foot -e $HOME/repos_scripts/torrent "$magnet"
|
setsid -f $TERMINAL -e $HOME/repos_scripts/torrent "$magnet"
|
||||||
|
|||||||
Reference in New Issue
Block a user