fix: re-save file if deleted

fix: download link status on file page while loading
download link status on file page while resolving showed "connecting"....it should only show this while downloading.
bump: redux streaming fix
This commit is contained in:
Thomas Zarebczan 2019-08-14 18:27:55 -04:00 committed by Sean Yesmunt
parent c20f491457
commit f6858beb68
4 changed files with 9 additions and 4 deletions

View file

@ -125,7 +125,7 @@
"jsmediatags": "^3.8.1", "jsmediatags": "^3.8.1",
"json-loader": "^0.5.4", "json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git", "lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#1bd625f0c6e9e36d14eb0c520a3eb99f9600705d", "lbry-redux": "lbryio/lbry-redux#6005fa245a888e2de045d7e42411847de7943f52",
"lbryinc": "lbryio/lbryinc#1ce266b3c52654190b955e9c869b8e302aa5c585", "lbryinc": "lbryio/lbryinc#1ce266b3c52654190b955e9c869b8e302aa5c585",
"lint-staged": "^7.0.2", "lint-staged": "^7.0.2",
"localforage": "^1.7.1", "localforage": "^1.7.1",

View file

@ -20,7 +20,7 @@ type Props = {
function FileDownloadLink(props: Props) { function FileDownloadLink(props: Props) {
const { fileInfo, downloading, loading, openModal, pause, claimIsMine, download, uri } = props; const { fileInfo, downloading, loading, openModal, pause, claimIsMine, download, uri } = props;
if (loading || downloading) { if (downloading) {
const progress = fileInfo && fileInfo.written_bytes > 0 ? (fileInfo.written_bytes / fileInfo.total_bytes) * 100 : 0; const progress = fileInfo && fileInfo.written_bytes > 0 ? (fileInfo.written_bytes / fileInfo.total_bytes) * 100 : 0;
const label = const label =
fileInfo && fileInfo.written_bytes > 0 ? progress.toFixed(0) + __('% downloaded') : __('Connecting...'); fileInfo && fileInfo.written_bytes > 0 ? progress.toFixed(0) + __('% downloaded') : __('Connecting...');

View file

@ -225,6 +225,11 @@ export function doPlayUri(uri: string, skipCostCheck: boolean = false, saveFileO
} }
} }
if (fileInfo && saveFile && (!fileInfo.download_path || !fileInfo.written_bytes)) {
beginGetFile();
return;
}
if (cost === 0 || skipCostCheck) { if (cost === 0 || skipCostCheck) {
beginGetFile(); beginGetFile();
return; return;

View file

@ -6762,9 +6762,9 @@ lazy-val@^1.0.3, lazy-val@^1.0.4:
yargs "^13.2.2" yargs "^13.2.2"
zstd-codec "^0.1.1" zstd-codec "^0.1.1"
lbry-redux@lbryio/lbry-redux#1bd625f0c6e9e36d14eb0c520a3eb99f9600705d: lbry-redux@lbryio/lbry-redux#6005fa245a888e2de045d7e42411847de7943f52:
version "0.0.1" version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/1bd625f0c6e9e36d14eb0c520a3eb99f9600705d" resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/6005fa245a888e2de045d7e42411847de7943f52"
dependencies: dependencies:
mime "^2.4.4" mime "^2.4.4"
proxy-polyfill "0.1.6" proxy-polyfill "0.1.6"