hanging commit
This commit is contained in:
parent
641161a912
commit
a9b2ad499e
@ -68,7 +68,7 @@ Actions.registerLogger = function(process, log) {
|
||||
// Starts a process and handles general errors
|
||||
Actions.spawnProcess = function(name, command, args) {
|
||||
let process = child_process.spawn(command, args);
|
||||
LOG.info(`spawned ${name} ${process.pid}`);
|
||||
LOG.info(`spawned ${name} ${process.pid}`, { name: name, command: command, args: args });
|
||||
process.on('close', (code, signal) => {
|
||||
LOG.silly(`${name} ${process.pid} closed, code: ${code}, signal: ${signal}`);
|
||||
});
|
||||
@ -90,7 +90,9 @@ Actions.spawnProcess = function(name, command, args) {
|
||||
* @returns the child process that was spawned
|
||||
*/
|
||||
Actions.startRecording = function(song) {
|
||||
let device = 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor';
|
||||
// pacmd list-sinks
|
||||
//let device = 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor';
|
||||
let device = 'alsa_output.pci-0000_00_1b.0.analog-stereo.monitor';
|
||||
let output = '../intermediate/' + song.guid + '.wav';
|
||||
// -v for verbose output
|
||||
let recording_process = Actions.spawnProcess(
|
||||
|
@ -1,4 +1,4 @@
|
||||
const electron = require('electron');
|
||||
const electron = require('electron').remote;
|
||||
const http = require('http');
|
||||
const Actions = require('./actions.js');
|
||||
|
||||
@ -56,13 +56,13 @@ async function stopRecordingStartConversion() {
|
||||
LOG.debug(`${conversionSong.filename} starting conversion...`);
|
||||
let conversionProcess = Actions.convertToMp3(conversionSong);
|
||||
Actions.registerLogger(conversionProcess, CVRTLOG);
|
||||
conversionProcess.on('exit', (code, signal) => {
|
||||
conversionProcess.on('close', (code, signal) => {
|
||||
LOG.info(`${conversionSong.filename} completed conversion`);
|
||||
|
||||
LOG.debug(`${conversionSong.filename} starting adding metadata...`);
|
||||
let metadataProcess = Actions.addMetadata(conversionSong);
|
||||
Actions.registerLogger(metadataProcess, METALOG);
|
||||
metadataProcess.on('exit', (code, signal) => {
|
||||
metadataProcess.on('close', (code, signal) => {
|
||||
LOG.info(`${conversionSong.filename} completed adding metadata`);
|
||||
Actions.removeIntermediate(conversionSong);
|
||||
});
|
||||
|
0
logger/logger.js
Executable file → Normal file
0
logger/logger.js
Executable file → Normal file
0
logger/package.json
Executable file → Normal file
0
logger/package.json
Executable file → Normal file
Loading…
Reference in New Issue
Block a user