From 6005fa245a888e2de045d7e42411847de7943f52 Mon Sep 17 00:00:00 2001 From: Thomas Zarebczan Date: Wed, 14 Aug 2019 18:22:50 -0400 Subject: [PATCH] fix: streaming + downloads Allows you to download while streaming + re-download already streamed content if it was deleted or settings changed. --- dist/bundle.es.js | 2 +- src/redux/actions/file.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index baa40ce..79ea5d8 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -2730,7 +2730,7 @@ function doPurchaseUri(uri, costInfo, saveFile = true, onSuccess) { const alreadyDownloading = fileInfo && !!downloadingByOutpoint[fileInfo.outpoint]; const alreadyStreaming = makeSelectStreamingUrlForUri(uri)(state); - if (alreadyDownloading || alreadyStreaming) { + if (!saveFile && (alreadyDownloading || alreadyStreaming)) { dispatch({ type: PURCHASE_URI_FAILED, data: { uri, error: `Already fetching uri: ${uri}` } diff --git a/src/redux/actions/file.js b/src/redux/actions/file.js index 79d9b99..f6befff 100644 --- a/src/redux/actions/file.js +++ b/src/redux/actions/file.js @@ -95,7 +95,7 @@ export function doPurchaseUri( const alreadyDownloading = fileInfo && !!downloadingByOutpoint[fileInfo.outpoint]; const alreadyStreaming = makeSelectStreamingUrlForUri(uri)(state); - if (alreadyDownloading || alreadyStreaming) { + if (!saveFile && (alreadyDownloading || alreadyStreaming)) { dispatch({ type: ACTIONS.PURCHASE_URI_FAILED, data: { uri, error: `Already fetching uri: ${uri}` },