diff --git a/README.md b/README.md index 1bf73ce..d0f4a4d 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Unix-like environment. - [jq](https://stedolan.github.io/jq/) is a lightweight and flexible command-line JSON processor. - [fzf](https://github.com/junegunn/fzf) is a general-purpose command-line fuzzy finder. - [gh](https://cli.github.com/) is the GitHub CLI. +- curl: Most UNIX-like OS should have it. ## Features diff --git a/lib b/lib index 5a1ee42..eff4e37 100644 --- a/lib +++ b/lib @@ -92,7 +92,10 @@ _play() { echo yellowprint "Press q to quit." echo - mpv "$1" || _graceful_exit "Play: Can't play mpv." + mpv "$1" || { + echo "Not able to play your station." + search_menu + } } _show_favlist() { diff --git a/search b/search index 0611683..8cf32a5 100644 --- a/search +++ b/search @@ -35,7 +35,10 @@ _search_play() { jq -r ".[$ANS-1]" <"$SEARCH_RESULTS" >"$TEMP_FILE" URL_RESOLVED=$(jq -r ".[$ANS-1] |.url_resolved" <"$SEARCH_RESULTS") if [[ -n $URL_RESOLVED ]]; then - mpv "$URL_RESOLVED" || _graceful_exit "Search: Can't play mpv." + mpv "$URL_RESOLVED" || { + echo "Not able to play your station." + search_menu + } else echo "url_resolved can't be found. Exiting ..." exit 1 @@ -110,7 +113,7 @@ advanced_search() { search_submenu() { echo -ne " -$APP_NAME SEARCH SUB MENU: +$APP_NAME SEARCH SUBMENU: $(greenprint '1)') Play $(greenprint '2)') Save $(greenprint '3)') Go back to the Search menu diff --git a/tera b/tera index 75cfa70..7e7359d 100755 --- a/tera +++ b/tera @@ -3,7 +3,7 @@ set -eu # shellcheck disable=SC2034 -VERSION="0.3.7" +VERSION="0.3.8" SCRIPT_DOT_DIR="$HOME/.config/tera" # CACHE_DIR="$HOME/.cache" FAVORITE_PATH="$SCRIPT_DOT_DIR/favorite"