fix(filters): importer (#1149)

fix(web): early exit on filter import
chore(readme): add new pic to readme
This commit is contained in:
stacksmash76 2023-09-26 20:30:23 +02:00 committed by GitHub
parent 1900bf7742
commit 25c3f02c72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 KiB

BIN
.github/images/front-dark.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 KiB

BIN
.github/images/front-light.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

View file

@ -8,7 +8,8 @@ With inspiration and ideas from tools like trackarr, autodl-irssi and flexget we
<p align="center"><img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/autobrr/autobrr?style=for-the-badge">&nbsp;<img alt="GitHub all releases" src="https://img.shields.io/github/downloads/autobrr/autobrr/total?style=for-the-badge">&nbsp;<img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/autobrr/autobrr/release.yml?style=for-the-badge"></p>
<img alt="autobrr ui" src=".github/images/autobrr-front.png"/><br/>
<img alt="autobrr ui" src=".github/images/front-dark.png" /><br/>
*We also have a light theme. Check it out [here](.github/images/front-light.png).*
## Documentation

View file

@ -111,6 +111,17 @@ const ImportAutodlIrssi = async (inputText: string) => {
const parser = new AutodlIrssiConfigParser();
parser.Parse(inputText);
if (!parser.releaseFilters) {
toast.custom((t) =>
<Toast
type="warning"
body="Cannot import given filter -- it is neither in JSON or autodl-irssi format."
t={t}
/>
);
return;
}
let numSuccess = 0;
for (const filter of parser.releaseFilters) {
try {