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

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 {