« get me outta code hell

http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/pickers2.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/pickers2.js b/src/pickers2.js
index b7ae460..53b76a8 100644
--- a/src/pickers2.js
+++ b/src/pickers2.js
@@ -104,7 +104,16 @@ const createOrderedPicker = playlist => {
   console.log(hm.timeline)
   console.log('initial length:', hm.timeline.length)
   for (let i = 0; i < 6; i++) {
-    console.log('next:', hm.getNextTrack())
-    console.log('length:', hm.timeline.length)
+    console.log(`(${hm.timelineIndex}) next:`, hm.getNextTrack())
+    console.log(`(-> ${hm.timelineIndex}) length:`, hm.timeline.length)
+  }
+
+  console.log('setting timeline index to 2 (3)..')
+  hm.timelineIndex = 2
+  console.log('current:', hm.currentTrack)
+
+  for (let i = 0; i < 6; i++) {
+    console.log(`(${hm.timelineIndex}) next:`, hm.getNextTrack())
+    console.log(`(-> ${hm.timelineIndex}) length:`, hm.timeline.length)
   }
 }