mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-05 06:09:57 -05:00
Moving FileGroups instead of refreshing files after they have been moved.
This commit is contained in:
parent
6fe8a7b704
commit
0f232fd533
59 changed files with 1902 additions and 1040 deletions
|
|
@ -43,10 +43,8 @@ class Downloader extends React.Component {
|
|||
this.setState({pending: true, submitted: false});
|
||||
try {
|
||||
let response = await postDownload(urls, downloader, null, null, null, destination, tagNames);
|
||||
if (response.status === 204) {
|
||||
if (response.ok) {
|
||||
this.setState({urls: '', pending: false, submitted: true});
|
||||
} else {
|
||||
toast({type: 'error', title: 'Error', description: 'Failed to create download!'});
|
||||
}
|
||||
} finally {
|
||||
this.setState({pending: false});
|
||||
|
|
@ -216,8 +214,7 @@ class ChannelDownload extends React.Component {
|
|||
if (response.status === 204) {
|
||||
this.setState({pending: false, disabled: false, success: true, url: '', ready: false});
|
||||
} else {
|
||||
const content = await response.json();
|
||||
let error = content.message || null;
|
||||
let error = (await response.json()).message || null;
|
||||
this.setState({pending: false, disabled: false, success: false, error});
|
||||
}
|
||||
}
|
||||
|
|
@ -355,8 +352,7 @@ class RSSDownload extends ChannelDownload {
|
|||
if (response.status === 204) {
|
||||
this.setState({pending: false, disabled: false, success: true, url: '', ready: false});
|
||||
} else {
|
||||
const content = await response.json();
|
||||
let error = content.message || null;
|
||||
let error = (await response.json()).message || null;
|
||||
this.setState({pending: false, disabled: false, success: false, error});
|
||||
}
|
||||
}
|
||||
|
|
@ -487,15 +483,8 @@ class ScrapeDownloader extends Downloader {
|
|||
suffix,
|
||||
max_pages,
|
||||
);
|
||||
if (response.status === 204) {
|
||||
if (response.ok) {
|
||||
this.setState({urls: '', pending: false, submitted: true});
|
||||
} else {
|
||||
const content = await response.json();
|
||||
let error = 'Failed to create download!';
|
||||
if (content && content['error']) {
|
||||
error = content['error'];
|
||||
}
|
||||
toast({type: 'error', title: 'Error', description: error});
|
||||
}
|
||||
} finally {
|
||||
this.setState({pending: false});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue