Use new format for open and reveal RPC methods

This commit is contained in:
Alex Liebowitz 2017-01-17 05:31:58 -05:00
parent 8fdfd4b60e
commit 839c42bc3a
2 changed files with 6 additions and 6 deletions

View file

@ -118,7 +118,7 @@ export let FileActions = React.createClass({
}, },
onOpenClick: function() { onOpenClick: function() {
if (this.state.fileInfo && this.state.fileInfo.completed) { if (this.state.fileInfo && this.state.fileInfo.completed) {
lbry.openFile(this.state.fileInfo.download_path); lbry.openFile(this.props.sdHash);
} }
}, },
handleDeleteCheckboxClicked: function(event) { handleDeleteCheckboxClicked: function(event) {
@ -128,7 +128,7 @@ export let FileActions = React.createClass({
}, },
handleRevealClicked: function() { handleRevealClicked: function() {
if (this.state.fileInfo && this.state.fileInfo.download_path) { if (this.state.fileInfo && this.state.fileInfo.download_path) {
lbry.revealFile(this.state.fileInfo.download_path); lbry.revealFile(this.props.sdHash);
} }
}, },
handleRemoveClicked: function() { handleRemoveClicked: function() {

View file

@ -275,12 +275,12 @@ lbry.removeFile = function(sdHash, name, deleteTargetFile=true, callback) { // N
}, callback); }, callback);
} }
lbry.openFile = function(path, callback) { lbry.openFile = function(sdHash, callback) {
lbry.call('open_file', {path: path}, callback); lbry.call('open', {sd_hash: sdHash}, callback);
} }
lbry.revealFile = function(path, callback) { lbry.revealFile = function(sdHash, callback) {
lbry.call('reveal', {path: path}, callback); lbry.call('reveal', {sd_hash: sdHash}, callback);
} }
lbry.getFileInfoWhenListed = function(name, callback, timeoutCallback, tryNum=0) { lbry.getFileInfoWhenListed = function(name, callback, timeoutCallback, tryNum=0) {