From 32b7be3cfc70c1d35ae99ccc7f4143e424cbce9a Mon Sep 17 00:00:00 2001 From: Mark Beamer Jr Date: Sun, 17 Jun 2018 01:46:06 -0400 Subject: [PATCH] removed direct call to doLoadVideo for autoplay handling. This is already being called in the play. No reason to call it twice. --- src/renderer/component/video/index.js | 3 +-- src/renderer/component/video/view.jsx | 13 +------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/renderer/component/video/index.js b/src/renderer/component/video/index.js index 9ce5f62e0..066b7c951 100644 --- a/src/renderer/component/video/index.js +++ b/src/renderer/component/video/index.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import * as settings from 'constants/settings'; import { doChangeVolume } from 'redux/actions/app'; import { selectVolume } from 'redux/selectors/app'; -import { doPlayUri, doSetPlayingUri, doLoadVideo } from 'redux/actions/content'; +import { doPlayUri, doSetPlayingUri } from 'redux/actions/content'; import { doPlay, doPause, savePosition } from 'redux/actions/media'; import { makeSelectMetadataForUri, @@ -38,7 +38,6 @@ const select = (state, props) => ({ const perform = dispatch => ({ play: uri => dispatch(doPlayUri(uri)), - load: uri => dispatch(doLoadVideo(uri)), cancelPlay: () => dispatch(doSetPlayingUri(null)), changeVolume: volume => dispatch(doChangeVolume(volume)), doPlay: () => dispatch(doPlay()), diff --git a/src/renderer/component/video/view.jsx b/src/renderer/component/video/view.jsx index dbb96bea9..b2448ba5f 100644 --- a/src/renderer/component/video/view.jsx +++ b/src/renderer/component/video/view.jsx @@ -80,22 +80,11 @@ class Video extends React.PureComponent { } handleAutoplay = (props: Props) => { - const { - autoplay, - playingUri, - fileInfo, - costInfo, - isDownloading, - uri, - load, - play, - metadata, - } = props; + const { autoplay, playingUri, fileInfo, costInfo, isDownloading, uri, play, metadata } = props; const playable = autoplay && playingUri !== uri && metadata && !metadata.nsfw; if (playable && costInfo && costInfo.cost === 0 && !fileInfo && !isDownloading) { - load(uri); play(uri); } else if (playable && fileInfo && fileInfo.blobs_completed > 0) { play(uri);