From 17d13c3a93b7fc6f61ef9f8599830a58a6608b32 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Wed, 23 Nov 2016 23:49:19 -0500 Subject: [PATCH] Properly notify when a download times out --- js/component/link.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/js/component/link.js b/js/component/link.js index bc3d12733..6cd97929c 100644 --- a/js/component/link.js +++ b/js/component/link.js @@ -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({ You don't have enough LBRY credits to pay for this stream. + + LBRY was unable to download the stream lbry://{this.props.streamName}. + ); }