Update rssDownloader.html

This commit is contained in:
Ruslan 2025-01-28 00:48:15 +03:00 committed by GitHub
commit 7ee3cd6d33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -430,24 +430,24 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
});
// get all categories and add to combobox
fetch("api/v2/torrents/categories", {
method: "GET",
cache: "no-store"
})
.then(async (response) => {
if (!response.ok) return;
method: "GET",
cache: "no-store"
})
.then(async (response) => {
if (!response.ok) return;
const responseJSON = await response.json();
const responseJSON = await response.json();
const combobox = $("assignCategoryCombobox");
for (const cat in responseJSON) {
if (!Object.hasOwn(responseJSON, cat)) continue;
const combobox = $("assignCategoryCombobox");
for (const cat in responseJSON) {
if (!Object.hasOwn(responseJSON, cat)) continue;
const option = document.createElement("option");
option.value = cat;
option.textContent = cat;
combobox.add(option);
}
});
const option = document.createElement("option");
option.value = cat;
option.appendChild(document.createTextNode(cat));
combobox.add(option);
}
});
// get all rss feed
const url = new URL("api/v2/rss/items", window.location);
url.search = new URLSearchParams({