enable transcoding flag

This commit is contained in:
jessop 2020-03-02 01:28:36 -05:00
parent f36b91496b
commit fd615dbb26
3 changed files with 20 additions and 5 deletions

13
dist/bundle.es.js vendored
View file

@ -3923,7 +3923,8 @@ const doPublish = (success, fail) => (dispatch, getState) => {
fee,
uri,
tags,
locations
locations,
optimize
} = publishData;
// Handle scenario where we have a claim that has the same name as a channel we are publishing with.
const myClaimForUriEditing = myClaimForUri && myClaimForUri.name === name ? myClaimForUri : null;
@ -3991,6 +3992,10 @@ const doPublish = (success, fail) => (dispatch, getState) => {
publishPayload.fee_amount = creditsToString(fee.amount);
}
if (optimize) {
publishPayload.optimize_file = true;
}
// Only pass file on new uploads, not metadata only edits.
// The sdk will figure it out
if (filePath) publishPayload.file_path = filePath;
@ -5465,7 +5470,8 @@ const defaultState$6 = {
tags: [],
publishing: false,
publishSuccess: false,
publishError: undefined
publishError: undefined,
optimize: false
};
const publishReducer = handleActions({
@ -5473,7 +5479,8 @@ const publishReducer = handleActions({
const { data } = action;
return _extends$e({}, state, data);
},
[CLEAR_PUBLISH]: () => _extends$e({}, defaultState$6),
[CLEAR_PUBLISH]: state => _extends$e({}, defaultState$6, { bid: state.bid, optimize: state.optimize
}),
[PUBLISH_START]: state => _extends$e({}, state, {
publishing: true,
publishSuccess: false

View file

@ -264,6 +264,7 @@ export const doPublish = (success: Function, fail: Function) => (
uri,
tags,
locations,
optimize,
} = publishData;
// Handle scenario where we have a claim that has the same name as a channel we are publishing with.
const myClaimForUriEditing = myClaimForUri && myClaimForUri.name === name ? myClaimForUri : null;
@ -301,6 +302,7 @@ export const doPublish = (success: Function, fail: Function) => (
tags: Array<string>,
locations?: Array<any>,
blocking: boolean,
optimize_file?: boolean,
} = {
name,
title,
@ -350,6 +352,10 @@ export const doPublish = (success: Function, fail: Function) => (
publishPayload.fee_amount = creditsToString(fee.amount);
}
if (optimize) {
publishPayload.optimize_file = true;
}
// Only pass file on new uploads, not metadata only edits.
// The sdk will figure it out
if (filePath) publishPayload.file_path = filePath;

View file

@ -28,6 +28,7 @@ type PublishState = {
otherLicenseDescription: string,
licenseUrl: string,
tags: Array<string>,
optimize: boolean,
};
const defaultState: PublishState = {
@ -58,6 +59,7 @@ const defaultState: PublishState = {
publishing: false,
publishSuccess: false,
publishError: undefined,
optimize: false,
};
export const publishReducer = handleActions(
@ -69,8 +71,8 @@ export const publishReducer = handleActions(
...data,
};
},
[ACTIONS.CLEAR_PUBLISH]: (): PublishState => ({
...defaultState,
[ACTIONS.CLEAR_PUBLISH]: (state: PublishState): PublishState => ({
...defaultState, bid: state.bid, optimize: state.optimize,
}),
[ACTIONS.PUBLISH_START]: (state: PublishState): PublishState => ({
...state,