mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-08 11:39:49 +00:00
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:
parent
d0a730f29f
commit
24e43ba42e
2 changed files with 2 additions and 6 deletions
|
@ -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,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue