From fe99fb8266e0f5938d06e03b4e7977133ae23f43 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Sat, 12 Jun 2021 22:56:33 +0200 Subject: [PATCH] store additional arguments in strm_later --- README.org | 1 - strm | 12 +++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.org b/README.org index d415be4..75ec14c 100644 --- a/README.org +++ b/README.org @@ -119,7 +119,6 @@ The last query arguments are saved if a =playback_directory= is set and neither the =--list= or =--tidy= flags are set. If you wan't to resume playback at a later time, it is sufficient to call =strm= without arguments. - Non-query parameters, such as =--shuffle= or =--or= must still be provided. *** The =--remote= flag diff --git a/strm b/strm index b56b8fa..2ebcfed 100755 --- a/strm +++ b/strm @@ -225,8 +225,9 @@ fi # Check queries if [ "${#queries[@]}" == 0 ]; then if [ "$playback_directory" != "" ] && test -f "$HOME/.cache/strm/strm_later" && [ "$tidy" == false ]; then - queries="$(<$HOME/.cache/strm/strm_later)" - IFS=" " read -a queries <<< "$queries" + source "$HOME/.cache/strm/strm_later" + #IFS=" " read -a queries <<< "$queries" + echo "${queries[@]}" else print_usage fi @@ -326,7 +327,12 @@ done if [ "$list" == false ]; then # Save arguments for later call - echo "${queries[@]}" > "$HOME/.cache/strm/strm_later" + if [ "$tidy" == false ] && [ "$playback_directory" != "" ]; then + echo "queries=(${queries[@]})" > "$HOME/.cache/strm/strm_later" + echo "fullscreen=$fullscreen" >> "$HOME/.cache/strm/strm_later" + echo "or=$or" >> "$HOME/.cache/strm/strm_later" + echo "shuffle=$shuffle" >> "$HOME/.cache/strm/strm_later" + fi # Print controls if [ "$is_remote_call" == true ]; then