From 49dc6890fc922aacd2313a484292196e676c780e Mon Sep 17 00:00:00 2001 From: Seth Call Date: Wed, 23 Sep 2015 14:39:34 -0500 Subject: [PATCH] * VRFS-3579 - dont try to kick off 2 downloads --- .../react-components/stores/JamTrackStore.js.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app/assets/javascripts/react-components/stores/JamTrackStore.js.coffee b/web/app/assets/javascripts/react-components/stores/JamTrackStore.js.coffee index 2e97dd4d2..9bea103ce 100644 --- a/web/app/assets/javascripts/react-components/stores/JamTrackStore.js.coffee +++ b/web/app/assets/javascripts/react-components/stores/JamTrackStore.js.coffee @@ -177,7 +177,9 @@ JamTrackActions = @JamTrackActions , null, true) when 'unknown' - if @jamTrack.activeMixdown.client_state != 'downloading' + # we need to check if @keyCheckTimeout exists; because if it does, we don't want to download while keying. + # 'unknown' is tricky here because the file probably is actually on disk, but the bridge API can say unknown until you've tried to key at least once + if @jamTrack.activeMixdown.client_state != 'downloading' && !@keyCheckTimeout? @jamTrack.activeMixdown.client_state = 'downloading' logger.debug("JamTrackStore: initiating download of mixdown") context.jamClient.JamTrackDownload(@jamTrack.id, @jamTrack.activeMixdown.id, context.JK.currentUserId,