We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6c13e4 commit 90ed44eCopy full SHA for 90ed44e
scripts/spr.sh
@@ -99,12 +99,14 @@ main() {
99
sprRemoteControl "$PLAY_PAUSE_BUTTON" "$BACK_BUTTON" "$NEXT_BUTTON"
100
fi
101
102
- if [ ! -f "$cache_file" ] || [ $(($(date +%s) - $(stat -f%c "$cache_file"))) -ge "$RATE" ]; then
103
- trackStatus "$PAUSE_ICON" "$PLAY_ICON" > "$cache_file"
104
- sliceTrack "$(cat $cache_file)" "$MAX_LENGTH" > "$cache_file"
+
+ if [ ! -f "$cache_file" ] || [ $(($(date +%s) - $(stat -c%Y "$cache_file" 2>/dev/null || stat -f%m "$cache_file"))) -ge "$RATE" ]; then
+ local full_track
105
+ full_track=$(trackStatus "$PAUSE_ICON" "$PLAY_ICON")
106
+ sliceTrack "$full_track" "$MAX_LENGTH" > "$cache_file"
107
108
- cat "$cache_file"
109
+ echo "$BACK_BUTTON"
110
}
111
112
main
0 commit comments