« get me outta code hell

Add console logs for indexing/done-indexing - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2017-09-06 00:14:03 -0300
committerFlorrie <towerofnix@gmail.com>2017-09-06 00:14:05 -0300
commit653b24355d4edd779a3a85e242e4d3061bf4ee4d (patch)
tree7cdd8ae05f40b8d8734ee03df706c0fcf69e3d46 /src
parenta724b26d5435db7647941f4f62e6ca3a12a63b06 (diff)
Add console logs for indexing/done-indexing
Particularly handy for slow machines, where indexing may take a
while (e.g. a Raspberry Pi).
Diffstat (limited to 'src')
-rw-r--r--src/pickers2.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pickers2.js b/src/pickers2.js
index f07cd91..42ca020 100644
--- a/src/pickers2.js
+++ b/src/pickers2.js
@@ -213,6 +213,7 @@ function generalPicker(playlist, lastTrack, options) {
   if (options.hasOwnProperty(flattenedCache)) {
     flattened = options[flattenedCache]
   } else {
+    console.log('\x1b[1K\rIndexing (flattening)...')
     flattened = sortFlattenGrouplike(playlist, sort, options.seed)
 
     if (typeof options.seed === 'undefined') {
@@ -221,6 +222,7 @@ function generalPicker(playlist, lastTrack, options) {
     delete flattened.newSeed
 
     options[flattenedCache] = flattened
+    console.log('\x1b[1K\rDone indexing.')
   }
 
   const index = flattened.items.indexOf(lastTrack)