From b0d534d174def2940287745535726c7e878dcbcc Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 5 Jun 2018 16:16:24 +0200 Subject: more sane file naming --- app/relay/modules/samplernn.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/relay/modules/samplernn.js') diff --git a/app/relay/modules/samplernn.js b/app/relay/modules/samplernn.js index 2dacaa7..73d0a5f 100644 --- a/app/relay/modules/samplernn.js +++ b/app/relay/modules/samplernn.js @@ -13,10 +13,11 @@ 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! - if ( line.match(/^got fn, /) ) { - let dataset = line.split(' => ')[1].trim() - task.dataset = dataset - return { type: 'progress', action: 'set_dataset', task, } + if ( line.match(/^youtube-dl got fn, /) ) { + let filename = line.split(' => ')[1].trim() + task.dataset = filename.split('.')[0] + task.opt.filename = filename + return { type: 'progress', action: 'resolve_dataset', task, } } return null } -- cgit v1.2.3-70-g09d2