From 8766d0f6c9fa89c1db9d2df063ffe14603ab5742 Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 30 May 2018 18:10:29 -0300 Subject: Automatically play next track --- index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'index.js') 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) -- cgit 1.3.0-6-gf8a5