« get me outta code hell

Automatically play next track - 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-05-30 18:10:29 -0300
committerFlorrie <towerofnix@gmail.com>2018-05-30 18:10:29 -0300
commit8766d0f6c9fa89c1db9d2df063ffe14603ab5742 (patch)
tree564cd3ea68aaae50f42e11ce05c0a985bab5974c /index.js
parent12ea120dba62d22e27badd4286f2310f0bc5990c (diff)
Automatically play next track
Diffstat (limited to 'index.js')
-rw-r--r--index.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/index.js b/index.js
index 635426e..a3f3b2f 100644
--- a/index.js
+++ b/index.js
@@ -3,6 +3,7 @@
 const { getPlayer } = require('./players')
 const { getDownloaderFor } = require('./downloaders')
 const { AppElement } = require('./ui')
+const { updatePlaylistFormat } = require('./playlist-utils')
 const ansi = require('./tui-lib/util/ansi')
 const CommandLineInterfacer = require('./tui-lib/util/CommandLineInterfacer')
 const EventEmitter = require('events')
@@ -94,8 +95,9 @@ async function main() {
     process.exit(0)
   })
 
-  const grouplike = {
+  let grouplike = {
     items: [
+      {name: 'bears', downloaderArg: 'http://www.billwurtz.com/bears.mp3'},
       {name: 'alphabet shuffle', downloaderArg: 'http://www.billwurtz.com/alphabet-shuffle.mp3'},
       {name: 'in california', downloaderArg: 'http://www.billwurtz.com/in-california.mp3'},
       {name: 'i love you', downloaderArg: 'http://www.billwurtz.com/i-love-you.mp3'},
@@ -107,6 +109,10 @@ async function main() {
     ]
   }
 
+  // let grouplike = require('./flat.json')
+
+  grouplike = updatePlaylistFormat(grouplike)
+
   appElement.grouplikeListingElement.loadGrouplike(grouplike)
 
   root.select(appElement.grouplikeListingElement)