Skip to content

Commit ea4e30b

Browse files
committed
try to avoid infinete loop
1 parent 57252c8 commit ea4e30b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

shelldio.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@ else
2222
RED=""
2323
BLUE=""
2424
RESET=""
25+
fielif [[ $input_play = "r" ]] || [[ $input_play = "R" ]]; then
26+
for pid in $(pgrep '^mpv$'); do
27+
url="$(ps -o command= -p "$pid" | awk '{print $2}')"
28+
if [[ "$url" == "$stathmos_url" ]]; then
29+
kill "$pid"
30+
fi
31+
done
32+
clear
33+
echo "Επιστροφή στη λίστα σταθμών"
34+
tput cnorm # Εμφάνιση cursor
35+
sleep 1
36+
clear
37+
input_play="" # <--- Reset input_play to avoid infinite reload
38+
break # <--- Break to outer loop to show the list again
2539
fi
2640

2741
### Variable List

0 commit comments

Comments
 (0)