summaryrefslogtreecommitdiff
path: root/app/client/modules/samplernn/samplernn.reducer.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-05 19:44:10 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-05 19:44:10 +0200
commit043fa9f94bdd3bad0c5c6a422e766ecc51fc1f82 (patch)
treecc3e3ef5ce3242f399cd5bd4c4c3d9e0ed45dafd /app/client/modules/samplernn/samplernn.reducer.js
parent9f81aab18011637ac8daf4cdcf7223ee636a4663 (diff)
include module...
Diffstat (limited to 'app/client/modules/samplernn/samplernn.reducer.js')
-rw-r--r--app/client/modules/samplernn/samplernn.reducer.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/app/client/modules/samplernn/samplernn.reducer.js b/app/client/modules/samplernn/samplernn.reducer.js
index 1397a0b..c1dee82 100644
--- a/app/client/modules/samplernn/samplernn.reducer.js
+++ b/app/client/modules/samplernn/samplernn.reducer.js
@@ -19,24 +19,6 @@ const samplernnReducer = (state = samplernnInitialState, action) => {
loading: false,
data: action.data,
}
-
- case types.socket.connect:
- return {
- ...state,
- }
-
- case types.task.task_begin:
- return {
- ...state,
- }
-
- case types.task.task_finish:
- return {
- ...state,
- }
-
- // so now the last thing is to figure out how to access things inside these datasets
- // and rebuild them if need be, considering this is SUPER awkward inside of redux.
case types.folder.create:
if (action.data.module === 'samplernn') {
@@ -123,7 +105,6 @@ const samplernnReducer = (state = samplernnInitialState, action) => {
return state
case types.file.update:
- console.log('>>>>>>> file update')
if (action.data.module === 'samplernn') {
let old_dataset;
let new_dataset = state.data.datasetLookup[action.data.dataset]
@@ -169,7 +150,6 @@ const samplernnReducer = (state = samplernnInitialState, action) => {
return state
case types.file.destroy:
- console.log(action.data)
if (action.data.module === 'samplernn') {
// delete the key from fileLookup
let fileLookup = {
@@ -185,16 +165,13 @@ const samplernnReducer = (state = samplernnInitialState, action) => {
if (!old_file) return state
let old_dataset = state.data.datasetLookup[old_file.dataset]
let dataset
- console.log(old_file.dataset, old_dataset)
if (old_dataset) {
dataset = {
...old_dataset,
input: old_dataset.input.filter(id => id !== old_file.id),
output: old_dataset.output.filter(id => id !== old_file.id),
}
- console.log(dataset.input.length, dataset.checkpoints.length, dataset.output.length)
if (! dataset.input.length && ! dataset.checkpoints.length && ! dataset.output.length) {
- console.log('dataset is empty')
delete datasetLookup[old_file.dataset]
let old_folder = folderLookup[old_file.folder_id]
folderLookup[old_file.folder_id] = {
@@ -207,7 +184,6 @@ const samplernnReducer = (state = samplernnInitialState, action) => {
}
}
delete fileLookup[old_file.id]
- // console.log(fileLookup)
return {
...state,
@@ -222,9 +198,6 @@ const samplernnReducer = (state = samplernnInitialState, action) => {
}
return state
- case types.socket.status:
- return samplernnSocket(state, action.data)
-
case types.samplernn.set_folder:
return {
...state,
@@ -248,14 +221,4 @@ const samplernnReducer = (state = samplernnInitialState, action) => {
}
}
-const samplernnSocket = (state, action) => {
- console.log(action)
- switch (action.key) {
- case 'list_directory':
- return state
- default:
- return state
- }
-}
-
export default samplernnReducer