WebUI: Implement subcategories

PR #18740.
This commit is contained in:
Bartu Özen 2023-04-02 11:02:22 +03:00 committed by GitHub
parent 40e28930a4
commit b55d4b1733
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 86 additions and 7 deletions

View file

@ -1383,8 +1383,16 @@ window.qBittorrent.DynamicTable = (function() {
return false;
break; // do nothing
default:
if (categoryHashInt !== genHash(row['full_data'].category))
return false;
if (!useSubcategories) {
if (categoryHashInt !== genHash(row['full_data'].category))
return false;
}
else {
const selectedCategoryName = category_list[categoryHash].name + "/";
const torrentCategoryName = row['full_data'].category + "/";
if (!torrentCategoryName.startsWith(selectedCategoryName))
return false;
}
}
}