summaryrefslogtreecommitdiff
path: root/app/client/modules/pix2pixhd
diff options
context:
space:
mode:
Diffstat (limited to 'app/client/modules/pix2pixhd')
-rw-r--r--app/client/modules/pix2pixhd/pix2pixhd.actions.js23
-rw-r--r--app/client/modules/pix2pixhd/views/pix2pixhd.results.js2
2 files changed, 24 insertions, 1 deletions
diff --git a/app/client/modules/pix2pixhd/pix2pixhd.actions.js b/app/client/modules/pix2pixhd/pix2pixhd.actions.js
index 1ee4886..1b22616 100644
--- a/app/client/modules/pix2pixhd/pix2pixhd.actions.js
+++ b/app/client/modules/pix2pixhd/pix2pixhd.actions.js
@@ -135,3 +135,26 @@ export const load_directories = (id) => (dispatch) => {
console.error(e)
})
}
+
+export const load_results = (id) => (dispatch) => {
+ console.log('hi')
+ const module = pix2pixhdModule.name
+ util.allProgress([
+ actions.file.index({ module, generated: true }),
+ actions.socket.list_sequences({ module, dir: 'results' }),
+ actions.socket.list_directory({ module, dir: 'renders' }),
+ ], (percent, i, n) => {
+ console.log('pix2pixhd load progress', i, n)
+ dispatch({ type: types.app.load_progress, progress: { i, n }})
+ }).then(res => {
+ const [files, results, renders] = res //, datasets, results, output, datasetUsage, lossReport] = res
+ console.log(files, results, renders)
+ dispatch({
+ type: types.pix2pixhd.load_results,
+ results: {
+ results,
+ renders,
+ }
+ })
+ })
+} \ No newline at end of file
diff --git a/app/client/modules/pix2pixhd/views/pix2pixhd.results.js b/app/client/modules/pix2pixhd/views/pix2pixhd.results.js
index dcbbfad..cf0bdf7 100644
--- a/app/client/modules/pix2pixhd/views/pix2pixhd.results.js
+++ b/app/client/modules/pix2pixhd/views/pix2pixhd.results.js
@@ -13,7 +13,7 @@ import { FileList, FileRow } from '../../../common/fileList.component'
class Pix2pixHDResults extends Component {
constructor(props){
super()
- // if (!props.pix2pixhd.data) props.actions.load_directories()
+ if (!props.pix2pixhd.results) props.actions.load_results()
}
render(){
if (this.props.pix2pixhd.loading) return <Loading progress={this.props.pix2pixhd.progress} />