diff --git a/js/component/file-actions.js b/js/component/file-actions.js index cdb4044b7..9e9ccc12e 100644 --- a/js/component/file-actions.js +++ b/js/component/file-actions.js @@ -118,7 +118,7 @@ export let FileActions = React.createClass({ }, onOpenClick: function() { if (this.state.fileInfo && this.state.fileInfo.completed) { - lbry.openFile(this.state.fileInfo.download_path); + lbry.openFile(this.props.sdHash); } }, handleDeleteCheckboxClicked: function(event) { @@ -128,7 +128,7 @@ export let FileActions = React.createClass({ }, handleRevealClicked: function() { if (this.state.fileInfo && this.state.fileInfo.download_path) { - lbry.revealFile(this.state.fileInfo.download_path); + lbry.revealFile(this.props.sdHash); } }, handleRemoveClicked: function() { diff --git a/js/lbry.js b/js/lbry.js index 628cd2bb4..12ba61707 100644 --- a/js/lbry.js +++ b/js/lbry.js @@ -275,12 +275,12 @@ lbry.removeFile = function(sdHash, name, deleteTargetFile=true, callback) { // N }, callback); } -lbry.openFile = function(path, callback) { - lbry.call('open_file', {path: path}, callback); +lbry.openFile = function(sdHash, callback) { + lbry.call('open', {sd_hash: sdHash}, callback); } -lbry.revealFile = function(path, callback) { - lbry.call('reveal', {path: path}, callback); +lbry.revealFile = function(sdHash, callback) { + lbry.call('reveal', {sd_hash: sdHash}, callback); } lbry.getFileInfoWhenListed = function(name, callback, timeoutCallback, tryNum=0) {