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) {
|
||||
const state = getState();
|
||||
|
||||
if (!outpoint) { throw new Error("outpoint is required to begin a download"); }
|
||||
|
||||
const { downloadingByOutpoint = {} } = state.fileInfo;
|
||||
|
||||
if (downloadingByOutpoint[outpoint]) return;
|
||||
|
@ -450,4 +452,4 @@ export function doPublish(params) {
|
|||
lbry.publishDeprecated(params, null, success, failure);
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
|
@ -30,7 +30,6 @@ export class SplashScreen extends React.PureComponent {
|
|||
|
||||
_updateStatusCallback(status) {
|
||||
const startupStatus = status.startup_status;
|
||||
console.log(status);
|
||||
if (startupStatus.code == "started") {
|
||||
// Wait until we are able to resolve a name before declaring
|
||||
// that we are done.
|
||||
|
|
|
@ -416,10 +416,16 @@ lbry.file_list = function(params = {}) {
|
|||
fileInfos => {
|
||||
removePendingPublishIfNeeded({ name, channel_name, outpoint });
|
||||
|
||||
const dummyFileInfos = lbry
|
||||
.getPendingPublishes()
|
||||
.map(pendingPublishToDummyFileInfo);
|
||||
resolve([...fileInfos, ...dummyFileInfos]);
|
||||
//if a naked file_list call, append the pending file infos
|
||||
if (!name && !channel_name && !outpoint) {
|
||||
const dummyFileInfos = lbry
|
||||
.getPendingPublishes()
|
||||
.map(pendingPublishToDummyFileInfo);
|
||||
|
||||
resolve([...fileInfos, ...dummyFileInfos]);
|
||||
} else {
|
||||
resolve(fileInfos);
|
||||
}
|
||||
},
|
||||
reject
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue