fix: streaming + downloads

Allows you to download while streaming + re-download already streamed content if it was deleted or settings changed.
This commit is contained in:
Thomas Zarebczan 2019-08-14 18:22:50 -04:00
parent 1bd625f0c6
commit 6005fa245a
2 changed files with 2 additions and 2 deletions

2
dist/bundle.es.js vendored
View file

@ -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}` }

View file

@ -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}` },