From e243e4f65cc2c98724a1cfb4d28ac5f1d1bc0a79 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 5 Jun 2018 15:40:56 +0200 Subject: api events over bridge --- app/relay/modules/samplernn.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/relay') diff --git a/app/relay/modules/samplernn.js b/app/relay/modules/samplernn.js index bdbe602..2dacaa7 100644 --- a/app/relay/modules/samplernn.js +++ b/app/relay/modules/samplernn.js @@ -12,7 +12,12 @@ const fetch = { }, listen: (task, line, i) => { // here i need to bridge again... get the filename that comes back from youtube-dl - // and tell the cortex that URL -> fn and add the filename!s + // and tell the cortex that URL -> fn and add the filename! + if ( line.match(/^got fn, /) ) { + let dataset = line.split(' => ')[1].trim() + task.dataset = dataset + return { type: 'progress', action: 'set_dataset', task, } + } return null } } -- cgit v1.2.3-70-g09d2