From 3100f20fe153862809f43bde5e7378352c93e3be Mon Sep 17 00:00:00 2001 From: Mikhail Tergoev Date: Sun, 29 Sep 2024 20:22:59 +0300 Subject: [PATCH] fixed unpack for gamescope session --- data_from_portwine/scripts/functions_helper | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 8572019c..7b2d4912 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -473,8 +473,9 @@ try_download () { # If gamescope session is active, use PW_TERM for downloading if check_gamescope_session ; then - $PW_TERM curl -f -# -A 'Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)' -H 'Cache-Control: no-cache, no-store' \ - -H 'Pragma: no-cache' -L ${FIRST_URL[@]} -o "$dest" + $PW_TERM "echo "Download $filename from ${FIRST_URL[0]}. Please wait!" \ + ; curl -f -# -A 'Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)' -H 'Cache-Control: no-cache, no-store' \ + -H 'Pragma: no-cache' -L ${FIRST_URL[@]} -o $dest" [[ "$?" != 0 ]] && return 1 || return 0 fi @@ -717,6 +718,13 @@ unpack () { silent) local silent=true ;; esac + + # If gamescope session is active, use PW_TERM for unpack + if check_gamescope_session ; then + $PW_TERM "echo "Unpacking file: $1. Please wait!" ; $command "$1" -C "$2"" + [[ "$?" != 0 ]] && return 1 || return 0 + fi + if [[ "$silent" != "true" ]] ; then set -o pipefail pw_start_progress_bar_cover_block "${COVERS_PATH}/unpacking_${LANGUAGE_GIF}.gif"