From 1c4e50669d03ca492475cc35184aae8c188820dc Mon Sep 17 00:00:00 2001 From: konsthol Date: Mon, 30 Dec 2024 21:48:31 +0200 Subject: [PATCH] formatted all --- grpoppro | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/grpoppro b/grpoppro index ee03690..6248935 100755 --- a/grpoppro +++ b/grpoppro @@ -164,8 +164,11 @@ function sourceData { # Perform menu search function menuSearch { # Two requests to the api - [[ "$INTERACTIVE" == "on" ]] && title=$(echo "" | wofi --dmenu --insensitive --prompt="Search Series" --width=300 --height=50) - [[ "$INTERACTIVE" == "off" ]] && [[ -z "$title" ]] && read -r -p "Search Series: " title + if [[ "$INTERACTIVE" == "on" ]]; then + title=$(echo "" | wofi --dmenu --insensitive --prompt="Search Series" --width=300 --height=50) + else + read -r -p "Search Series: " title + fi if [[ -z "$title" ]]; then message "Nothing given" exit 0 @@ -323,6 +326,7 @@ if [[ "$#" -eq 3 ]]; then episode="$3" response="$(curlRequest "$apiurl/uploads/playlists/$internalid.txt")" streamurl="$(echo "$response" | grep "mp4" | grep "${season}x${episode}" | head -n1 | awk -F\" '{print $8}')" + message "Loading $title at season $season on episode $episode" play exit 0 fi @@ -333,6 +337,7 @@ if [[ "$#" -eq 1 ]] && [[ "$1" != "--menu" ]] && [[ "$1" != "--resume" ]] && [[ basics "$1" # Gets the title, performs one request to imdb and gets the complete url getInternalID "$simpleurl" # Gets the complete url and performs one request to get the internal id or inform us it does not exist getMovieStreamUrl "$internalid" # Gets the internal id and performs one request to get the stream url + message "Loading $title" play # It uses mpv to stream the file exit 0 fi