store additional arguments in strm_later

This commit is contained in:
Denis Lehmann 2021-06-12 22:56:33 +02:00
parent 2200ce3d43
commit fe99fb8266
2 changed files with 9 additions and 4 deletions

View file

@ -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

12
strm
View file

@ -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