diff --git a/js/component/file-actions.js b/js/component/file-actions.js index b2a8ff790..cc1dba546 100644 --- a/js/component/file-actions.js +++ b/js/component/file-actions.js @@ -248,13 +248,13 @@ export let FileActions = React.createClass({ componentDidMount: function() { this._isMounted = true; this._fileInfoSubscribeId = lbry.fileInfoSubscribe(this.props.sdHash, this.onFileInfoUpdate); - lbry.getStreamAvailability(this.props.streamName, (availability) => { + lbry.getPeersForBlobHash(this.props.sdHash, (peers) => { if (!this._isMounted) { return; } this.setState({ - available: availability > 0, + available: peers.length > 0, }); }); }, diff --git a/js/lbry.js b/js/lbry.js index c55927714..088bccf9a 100644 --- a/js/lbry.js +++ b/js/lbry.js @@ -207,10 +207,6 @@ lbry.getPeersForBlobHash = function(blobHash, callback) { }); } -lbry.getStreamAvailability = function(name, callback) { - lbry.call('get_availability', {name: name}, callback); -} - lbry.getCostInfoForName = function(name, callback, errorCallback) { /** * Takes a LBRY name; will first try and calculate a total cost using