diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-10-15 03:55:36 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-10-15 03:55:36 +0300 |
commit | 234287650c5c4fbf0ab78e4a3578de4c6c50f5f3 (patch) | |
tree | b033334f19d8941b610c46b36a76a363b950f05d /client/js | |
parent | 82bc9a7901ac9ffa20782a46c7d6640831b5a4a6 (diff) | |
download | arching-kaos-radio-234287650c5c4fbf0ab78e4a3578de4c6c50f5f3.tar.gz arching-kaos-radio-234287650c5c4fbf0ab78e4a3578de4c6c50f5f3.tar.bz2 arching-kaos-radio-234287650c5c4fbf0ab78e4a3578de4c6c50f5f3.zip |
Debug
Diffstat (limited to 'client/js')
-rw-r--r-- | client/js/radio_emulator.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/js/radio_emulator.js b/client/js/radio_emulator.js index 4b4fdf9..ac2299a 100644 --- a/client/js/radio_emulator.js +++ b/client/js/radio_emulator.js @@ -308,11 +308,11 @@ function listCallback(json, params) debugLog('First!'); break; } - else if ( values.now_on_sequence > json.list[i].starts_on && values.now_on_sequence > json.list[i+1].starts_on ) + else if ( values.now_on_sequence < json.list[i].starts_on ) { - appendPreviouslyPlayedShows(json.list[i]); - values.now_on_sequence = values.now_on_sequence - json.list[i+1].starts_on; - FetchJSON(`${jsonRequest}${json.list[i+1].hash}`, loadShowCallback, [json, values.now_on_sequence, json.list[i+1], hash_of_list]); + if ( i !== 0 ) appendPreviouslyPlayedShows(json.list[i-1]); + values.now_on_sequence = values.now_on_sequence - json.list[i].starts_on; + FetchJSON(`${jsonRequest}${json.list[i].hash}`, loadShowCallback, [json, values.now_on_sequence, json.list[i], hash_of_list]); debugLog('Second!'); break; } |