diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-10-15 03:48:31 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-10-15 03:48:31 +0300 |
commit | 99aab1eb01ff50a8c296aca25da000d0923868a9 (patch) | |
tree | 1229c0b74bc3687a20aa41bd6528c2d758e9b923 /client | |
parent | 27fc18e54d6441f8951647023e4f817befa829a8 (diff) | |
download | arching-kaos-radio-99aab1eb01ff50a8c296aca25da000d0923868a9.tar.gz arching-kaos-radio-99aab1eb01ff50a8c296aca25da000d0923868a9.tar.bz2 arching-kaos-radio-99aab1eb01ff50a8c296aca25da000d0923868a9.zip |
Possible fix
Diffstat (limited to 'client')
-rw-r--r-- | client/js/radio_emulator.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/js/radio_emulator.js b/client/js/radio_emulator.js index 7c69151..65a593b 100644 --- a/client/js/radio_emulator.js +++ b/client/js/radio_emulator.js @@ -295,8 +295,8 @@ function listCallback(json, params) for ( var i = 0; i < json.list.length - 1; i++) { debugLog("getting there") - debugLog(`${json.list[i].starts_on} < ${values.now_on_sequence} < ${json.list[i+1].starts_on}` ) - if ( values.now_on_sequence > json.list[i].starts_on && values.now_on_sequence < json.list[i+1].starts_on ) + debugLog(`${json.list[i].starts_on} < ${values.now_on_sequence} < ${json.list[i+1].starts_on}`); + if ( json.list[i].starts_on < values.now_on_sequence && values.now_on_sequence < json.list[i+1].starts_on ) { if( i !== 0) { @@ -311,7 +311,7 @@ function listCallback(json, params) else if ( values.now_on_sequence > json.list[i].starts_on && values.now_on_sequence > json.list[i+1].starts_on ) { appendPreviouslyPlayedShows(json.list[i]); - i++; + ++i; 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!'); |