mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-15 14:59:48 +00:00
fix incorrect file_list responses
This commit is contained in:
parent
f4bdabd5d8
commit
d58990f240
3 changed files with 13 additions and 6 deletions
|
@ -231,6 +231,8 @@ export function doStartDownload(uri, outpoint) {
|
||||||
return function(dispatch, getState) {
|
return function(dispatch, getState) {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
|
|
||||||
|
if (!outpoint) { throw new Error("outpoint is required to begin a download"); }
|
||||||
|
|
||||||
const { downloadingByOutpoint = {} } = state.fileInfo;
|
const { downloadingByOutpoint = {} } = state.fileInfo;
|
||||||
|
|
||||||
if (downloadingByOutpoint[outpoint]) return;
|
if (downloadingByOutpoint[outpoint]) return;
|
||||||
|
|
|
@ -30,7 +30,6 @@ export class SplashScreen extends React.PureComponent {
|
||||||
|
|
||||||
_updateStatusCallback(status) {
|
_updateStatusCallback(status) {
|
||||||
const startupStatus = status.startup_status;
|
const startupStatus = status.startup_status;
|
||||||
console.log(status);
|
|
||||||
if (startupStatus.code == "started") {
|
if (startupStatus.code == "started") {
|
||||||
// Wait until we are able to resolve a name before declaring
|
// Wait until we are able to resolve a name before declaring
|
||||||
// that we are done.
|
// that we are done.
|
||||||
|
|
|
@ -416,10 +416,16 @@ lbry.file_list = function(params = {}) {
|
||||||
fileInfos => {
|
fileInfos => {
|
||||||
removePendingPublishIfNeeded({ name, channel_name, outpoint });
|
removePendingPublishIfNeeded({ name, channel_name, outpoint });
|
||||||
|
|
||||||
|
//if a naked file_list call, append the pending file infos
|
||||||
|
if (!name && !channel_name && !outpoint) {
|
||||||
const dummyFileInfos = lbry
|
const dummyFileInfos = lbry
|
||||||
.getPendingPublishes()
|
.getPendingPublishes()
|
||||||
.map(pendingPublishToDummyFileInfo);
|
.map(pendingPublishToDummyFileInfo);
|
||||||
|
|
||||||
resolve([...fileInfos, ...dummyFileInfos]);
|
resolve([...fileInfos, ...dummyFileInfos]);
|
||||||
|
} else {
|
||||||
|
resolve(fileInfos);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
reject
|
reject
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue