Merge pull request #181 from lbryio/fix-publish-bugs
Fix: publish bugs while editing
This commit is contained in:
commit
436e49f859
2 changed files with 6 additions and 20 deletions
15
dist/bundle.es.js
vendored
15
dist/bundle.es.js
vendored
|
@ -3041,7 +3041,8 @@ const doPrepareEdit = (claim, uri, fileInfo, fs) => dispatch => {
|
|||
license,
|
||||
license_url: licenseUrl,
|
||||
thumbnail,
|
||||
title
|
||||
title,
|
||||
tags
|
||||
} = value;
|
||||
|
||||
const publishData = {
|
||||
|
@ -3057,7 +3058,8 @@ const doPrepareEdit = (claim, uri, fileInfo, fs) => dispatch => {
|
|||
uri,
|
||||
uploadThumbnailStatus: thumbnail ? MANUAL : undefined,
|
||||
licenseUrl,
|
||||
nsfw: isClaimNsfw(claim)
|
||||
nsfw: isClaimNsfw(claim),
|
||||
tags: tags ? tags.map(tag => ({ name: tag })) : []
|
||||
};
|
||||
|
||||
// Make sure custom licenses are mapped properly
|
||||
|
@ -3079,15 +3081,6 @@ const doPrepareEdit = (claim, uri, fileInfo, fs) => dispatch => {
|
|||
publishData['channel'] = channelName;
|
||||
}
|
||||
|
||||
if (fs && fileInfo && fileInfo.download_path) {
|
||||
try {
|
||||
fs.accessSync(fileInfo.download_path, fs.constants.R_OK);
|
||||
publishData.filePath = fileInfo.download_path;
|
||||
} catch (e) {
|
||||
console.error(e.name, e.message);
|
||||
}
|
||||
}
|
||||
|
||||
dispatch({ type: DO_PREPARE_EDIT, data: publishData });
|
||||
};
|
||||
|
||||
|
|
|
@ -189,6 +189,7 @@ export const doPrepareEdit = (claim: StreamClaim, uri: string, fileInfo: FileLis
|
|||
license_url: licenseUrl,
|
||||
thumbnail,
|
||||
title,
|
||||
tags,
|
||||
} = value;
|
||||
|
||||
const publishData: UpdatePublishFormData = {
|
||||
|
@ -205,6 +206,7 @@ export const doPrepareEdit = (claim: StreamClaim, uri: string, fileInfo: FileLis
|
|||
uploadThumbnailStatus: thumbnail ? THUMBNAIL_STATUSES.MANUAL : undefined,
|
||||
licenseUrl,
|
||||
nsfw: isClaimNsfw(claim),
|
||||
tags: tags ? tags.map(tag => ({ name: tag })) : [],
|
||||
};
|
||||
|
||||
// Make sure custom licenses are mapped properly
|
||||
|
@ -226,15 +228,6 @@ export const doPrepareEdit = (claim: StreamClaim, uri: string, fileInfo: FileLis
|
|||
publishData['channel'] = channelName;
|
||||
}
|
||||
|
||||
if (fs && fileInfo && fileInfo.download_path) {
|
||||
try {
|
||||
fs.accessSync(fileInfo.download_path, fs.constants.R_OK);
|
||||
publishData.filePath = fileInfo.download_path;
|
||||
} catch (e) {
|
||||
console.error(e.name, e.message);
|
||||
}
|
||||
}
|
||||
|
||||
dispatch({ type: ACTIONS.DO_PREPARE_EDIT, data: publishData });
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue