some prompt text changes
This commit is contained in:
parent
879e3656e6
commit
af65148b3d
7
pirokit
7
pirokit
|
@ -6,7 +6,7 @@
|
|||
mkdir -p $HOME/.cache/pirokit
|
||||
|
||||
if [ -z $1 ]; then
|
||||
query=$(printf "" | ${RUNLAUNCHER:-spmenu} -p "Search 1337x" -g 1 -im -hit -g 1)
|
||||
query=$(printf "" | ${RUNLAUNCHER:-spmenu} -p "Search 1337x" -g 1 -im -hit -g 1 -hmc)
|
||||
else
|
||||
query=$1
|
||||
fi
|
||||
|
@ -15,6 +15,7 @@ fi
|
|||
|
||||
baseurl="https://1337x.to"
|
||||
cachedir="$HOME/.cache/pirokit"
|
||||
original_query="$query"
|
||||
query="$(sed 's/ /+/g' <<<$query)"
|
||||
|
||||
curl -s https://1337x.to/search/$query/1/ > $cachedir/tmp.html
|
||||
|
@ -25,7 +26,7 @@ grep -o '<a href="/torrent/.*</a>' $cachedir/tmp.html |
|
|||
|
||||
result_count=$(wc -l $cachedir/titles.bw | awk '{print $1}')
|
||||
if [ "$result_count" -lt 1 ]; then
|
||||
printf "No result found matching '$query'.\n"
|
||||
printf "No result found matching '$original_query'.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -55,7 +56,7 @@ awk '{print "[S:"$1 ", L:"$2"]" }' $cachedir/seedleech.bw > $cachedir/tmp && mv
|
|||
|
||||
# Getting the line number
|
||||
LINE=$(paste -d\ $cachedir/size.bw $cachedir/seedleech.bw $cachedir/titles.bw |
|
||||
${RUNLAUNCHER:-spmenu} -i -l 25 -g 1 -p 'Result' |
|
||||
${RUNLAUNCHER:-spmenu} -i -l 25 -g 1 -p "Result from query '$original_query'" |
|
||||
cut -d\- -f1 |
|
||||
awk '{$1=$1; print}')
|
||||
|
||||
|
|
Loading…
Reference in a new issue