Support 0.31 SDK, vrooom #2277
6 changed files with 20 additions and 20 deletions
|
@ -135,7 +135,7 @@
|
||||||
"yarn": "^1.3"
|
"yarn": "^1.3"
|
||||||
},
|
},
|
||||||
"lbrySettings": {
|
"lbrySettings": {
|
||||||
"lbrynetDaemonVersion": "0.30.4",
|
"lbrynetDaemonVersion": "0.31.0rc5",
|
||||||
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
|
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
|
||||||
"lbrynetDaemonDir": "static/daemon",
|
"lbrynetDaemonDir": "static/daemon",
|
||||||
"lbrynetDaemonFileName": "lbrynet"
|
"lbrynetDaemonFileName": "lbrynet"
|
||||||
|
|
|
@ -62,7 +62,11 @@ class FileDetails extends PureComponent<Props> {
|
||||||
const { description, language, license } = metadata;
|
const { description, language, license } = metadata;
|
||||||
|
|
||||||
const mediaType = contentType || 'unknown';
|
const mediaType = contentType || 'unknown';
|
||||||
const downloadPath = fileInfo ? path.normalize(fileInfo.download_path) : null;
|
let downloadPath =
|
||||||
|
fileInfo && fileInfo.download_path ? path.normalize(fileInfo.download_path) : null;
|
||||||
|
// We should check if the file exists, and then show a better message, wtih an option to redownload.
|
||||||
|
if (fileInfo && fileInfo.download_path === null)
|
||||||
|
downloadPath = 'File may have been deleted or moved.';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
|
|
@ -58,15 +58,14 @@ class FilePage extends React.Component<Props> {
|
||||||
];
|
];
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { uri, fileInfo, fetchFileInfo, fetchCostInfo, setViewed, isSubscribed } = this.props;
|
const { uri, fileInfo, fetchFileInfo, fetchCostInfo, setViewed, isSubscribed } = this.props;
|
||||||
|
|
||||||
if (isSubscribed) {
|
if (isSubscribed) {
|
||||||
this.removeFromSubscriptionNotifications();
|
this.removeFromSubscriptionNotifications();
|
||||||
}
|
}
|
||||||
|
// always refresh file info when entering file page
|
||||||
if (fileInfo === undefined) {
|
|
||||||
fetchFileInfo(uri);
|
fetchFileInfo(uri);
|
||||||
}
|
|
||||||
|
|
||||||
// See https://github.com/lbryio/lbry-desktop/pull/1563 for discussion
|
// See https://github.com/lbryio/lbry-desktop/pull/1563 for discussion
|
||||||
fetchCostInfo(uri);
|
fetchCostInfo(uri);
|
||||||
|
|
|
@ -13,7 +13,7 @@ export type Price = {
|
||||||
};
|
};
|
||||||
|
|
||||||
type DaemonSettings = {
|
type DaemonSettings = {
|
||||||
download_directory: string,
|
download_dir: string,
|
||||||
disable_max_key_fee: boolean,
|
disable_max_key_fee: boolean,
|
||||||
share_usage_data: boolean,
|
share_usage_data: boolean,
|
||||||
max_key_fee?: Price,
|
max_key_fee?: Price,
|
||||||
|
@ -80,7 +80,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
onDownloadDirChange(newDirectory: string) {
|
onDownloadDirChange(newDirectory: string) {
|
||||||
|
|||||||
this.setDaemonSetting('download_directory', newDirectory);
|
this.setDaemonSetting('download_dir', newDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
onKeyFeeChange(newValue: Price) {
|
onKeyFeeChange(newValue: Price) {
|
||||||
|
@ -190,7 +190,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
<div className="card__content">
|
<div className="card__content">
|
||||||
<FileSelector
|
<FileSelector
|
||||||
type="openDirectory"
|
type="openDirectory"
|
||||||
currentPath={daemonSettings.download_directory}
|
currentPath={daemonSettings.download_dir}
|
||||||
onFileChosen={this.onDownloadDirChange}
|
onFileChosen={this.onDownloadDirChange}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
import type { Dispatch, GetState } from 'types/redux';
|
import type { Dispatch, GetState } from 'types/redux';
|
||||||
import type { Source, Metadata } from 'types/claim';
|
import type { Metadata } from 'types/claim';
|
||||||
import type {
|
import type {
|
||||||
UpdatePublishFormData,
|
UpdatePublishFormData,
|
||||||
UpdatePublishFormAction,
|
UpdatePublishFormAction,
|
||||||
|
@ -226,7 +226,6 @@ export const doPublish = (params: PublishParams) => (
|
||||||
contentIsFree,
|
contentIsFree,
|
||||||
price,
|
price,
|
||||||
uri,
|
uri,
|
||||||
sources,
|
|
||||||
} = params;
|
} = params;
|
||||||
|
|
||||||
// get the claim id from the channel name, we will use that instead
|
// get the claim id from the channel name, we will use that instead
|
||||||
|
@ -250,7 +249,6 @@ export const doPublish = (params: PublishParams) => (
|
||||||
bid: ?number,
|
bid: ?number,
|
||||||
metadata: ?Metadata,
|
metadata: ?Metadata,
|
||||||
file_path?: string,
|
file_path?: string,
|
||||||
sources?: Source,
|
|
||||||
} = {
|
} = {
|
||||||
name,
|
name,
|
||||||
channel_id: channelId,
|
channel_id: channelId,
|
||||||
|
@ -264,12 +262,8 @@ export const doPublish = (params: PublishParams) => (
|
||||||
amount: creditsToString(fee.amount),
|
amount: creditsToString(fee.amount),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
// only pass file on new uploads, not metadata only edits.
|
||||||
if (filePath) {
|
if (filePath) publishPayload.file_path = filePath;
|
||||||
publishPayload.file_path = filePath;
|
|
||||||
} else {
|
|
||||||
publishPayload.sources = sources;
|
|
||||||
}
|
|
||||||
|
|
||||||
dispatch({ type: ACTIONS.PUBLISH_START });
|
dispatch({ type: ACTIONS.PUBLISH_START });
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,10 @@ export function doFetchDaemonSettings() {
|
||||||
|
|
||||||
export function doSetDaemonSetting(key, value) {
|
export function doSetDaemonSetting(key, value) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
const newSettings = {};
|
const newSettings = {
|
||||||
newSettings[key] = value;
|
key,
|
||||||
|
value,
|
||||||
|
};
|
||||||
Lbry.settings_set(newSettings).then(newSettings);
|
Lbry.settings_set(newSettings).then(newSettings);
|
||||||
Lbry.settings_get().then(settings => {
|
Lbry.settings_get().then(settings => {
|
||||||
analytics.toggle(settings.share_usage_data, true);
|
analytics.toggle(settings.share_usage_data, true);
|
||||||
|
@ -71,6 +73,7 @@ export function doUpdateIsNight() {
|
||||||
export function doUpdateIsNightAsync() {
|
export function doUpdateIsNightAsync() {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch(doUpdateIsNight());
|
dispatch(doUpdateIsNight());
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
const updateIsNightInterval = setInterval(
|
const updateIsNightInterval = setInterval(
|
||||||
() => dispatch(doUpdateIsNight()),
|
() => dispatch(doUpdateIsNight()),
|
||||||
UPDATE_IS_NIGHT_INTERVAL
|
UPDATE_IS_NIGHT_INTERVAL
|
||||||
|
|
Loading…
Reference in a new issue
This shouldn't need a client setting either.