Revert "Use get_availability to determine stream availability"

This reverts commit c209c1f84f.

This commit may have broken downloading/watching by never showing the download button.
Let's see if reverting it fixes the issue. --grin
This commit is contained in:
Alex Grintsvayg 2017-02-18 09:53:05 -05:00
parent d0a730f29f
commit 24e43ba42e
2 changed files with 2 additions and 6 deletions

View file

@ -248,13 +248,13 @@ export let FileActions = React.createClass({
componentDidMount: function() { componentDidMount: function() {
this._isMounted = true; this._isMounted = true;
this._fileInfoSubscribeId = lbry.fileInfoSubscribe(this.props.sdHash, this.onFileInfoUpdate); this._fileInfoSubscribeId = lbry.fileInfoSubscribe(this.props.sdHash, this.onFileInfoUpdate);
lbry.getStreamAvailability(this.props.streamName, (availability) => { lbry.getPeersForBlobHash(this.props.sdHash, (peers) => {
if (!this._isMounted) { if (!this._isMounted) {
return; return;
} }
this.setState({ this.setState({
available: availability > 0, available: peers.length > 0,
}); });
}); });
}, },

View file

@ -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) { lbry.getCostInfoForName = function(name, callback, errorCallback) {
/** /**
* Takes a LBRY name; will first try and calculate a total cost using * Takes a LBRY name; will first try and calculate a total cost using