« get me outta code hell

Smart playlists - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/index.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-06-04 21:27:18 -0300
committerFlorrie <towerofnix@gmail.com>2018-06-04 21:27:20 -0300
commit6055638558a345904b41467839191a7143862d25 (patch)
tree9b192640b171f48282650903b398084f24481507 /index.js
parent6d270d43d5f09108132557100065fab3c0d34afc (diff)
Smart playlists
Basically directly pulled from http-music. Want to make a nice UI for
this eventually ("opening playlist..." popup dialog), but not for now.
Diffstat (limited to 'index.js')
-rw-r--r--index.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/index.js b/index.js
index df60207..72c2383 100644
--- a/index.js
+++ b/index.js
@@ -2,6 +2,7 @@
 
 const { AppElement } = require('./ui')
 const { updatePlaylistFormat } = require('./playlist-utils')
+const processSmartPlaylist = require('./smart-playlist')
 const ansi = require('./tui-lib/util/ansi')
 const CommandLineInterfacer = require('./tui-lib/util/CommandLineInterfacer')
 const EventEmitter = require('events')
@@ -65,10 +66,13 @@ async function main() {
   }
 
   if (process.argv[2]) {
+    flushable.write(ansi.moveCursor(0, 0))
+    flushable.write('Opening playlist...')
+    flushable.flush()
     grouplike = require(process.argv[2])
   }
 
-  grouplike = updatePlaylistFormat(grouplike)
+  grouplike = await processSmartPlaylist(grouplike)
 
   appElement.grouplikeListingElement.loadGrouplike(grouplike)