diff options
Diffstat (limited to '1337x')
-rwxr-xr-x | 1337x | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -60,8 +60,7 @@ main() [ -z "$WAYLAND_DISPLAY" ] && menu="dmenu" - if [ "$#" -gt 0 ] && [ "$1" = "-o" ] - then + if [ "$#" -gt 0 ] && [ "$1" = "-o" ]; then out=true shift fi @@ -70,17 +69,16 @@ main() query="${*:-$(printf "" | "$menu" -p " ")}" [ -z "$query" ] && - die "please enter a query" + exit 1 fetch="$(search_1337x "$query")" select="$(echo "$fetch" | sed -e's/^.*\///g' | tr '-' ' ' | "$menu" -l 25 -p " " | tr ' ' '-')" magnet="$(magnet_1337x "$(echo "$fetch" | grep "$select")")" [ -z "$magnet" ] && - die "empty magnet" + die "empty torrent magnet" - if [ "$out" = true ] - then + if [ "$out" = true ]; then echo "$magnet" else dep_check "pirowatch" |