aboutsummaryrefslogtreecommitdiff
path: root/client/js
diff options
context:
space:
mode:
Diffstat (limited to 'client/js')
-rw-r--r--client/js/radio_emulator.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/client/js/radio_emulator.js b/client/js/radio_emulator.js
index 65a593b..a10f656 100644
--- a/client/js/radio_emulator.js
+++ b/client/js/radio_emulator.js
@@ -311,9 +311,8 @@ 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;
- 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]);
+ 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]);
debugLog('Second!');
break;
}