Properly notify when a download times out
This commit is contained in:
parent
323cedadb2
commit
17d13c3a93
1 changed files with 14 additions and 4 deletions
|
@ -116,10 +116,17 @@ var DownloadLink = React.createClass({
|
|||
});
|
||||
} else {
|
||||
lbry.getStream(this.props.streamName, (streamInfo) => {
|
||||
this.setState({
|
||||
modal: 'downloadStarted',
|
||||
filePath: streamInfo.path,
|
||||
});
|
||||
if (typeof streamInfo !== 'object') {
|
||||
this.setState({
|
||||
modal: 'timedOut',
|
||||
downloading: false,
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
modal: 'downloadStarted',
|
||||
filePath: streamInfo.path,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -137,6 +144,9 @@ var DownloadLink = React.createClass({
|
|||
<Modal isOpen={this.state.modal == 'notEnoughCredits'} onConfirmed={this.closeModal}>
|
||||
You don't have enough LBRY credits to pay for this stream.
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'timedOut'} onConfirmed={this.closeModal}>
|
||||
LBRY was unable to download the stream <strong>lbry://{this.props.streamName}</strong>.
|
||||
</Modal>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue