UI添加两个过滤器: 区域过滤器和类型过滤器

This commit is contained in:
Peng-YM
2020-08-31 21:10:36 +08:00
parent 9291c4f628
commit ea90f16e54
5 changed files with 268 additions and 79 deletions

View File

@@ -50,6 +50,7 @@ $app.route("/api/collection/:name")
.get(getCollection)
.patch(updateCollection)
.delete(deleteCollection);
$app.route("/api/collection")
.get(getAllCollections)
.post(newCollection)
@@ -179,7 +180,7 @@ async function parseSub(sub, platform) {
if (item.type.indexOf("Filter") !== -1) {
const filter = AVAILABLE_FILTERS[item.type];
if (filter) {
$filter.addFilters(filter(...(item.args || [])));
$filter.addFilters(filter(item.args));
proxies = $filter.process(proxies);
$.log(`Applying filter "${item.type}" with arguments:\n >>> ${item.args || "None"}`);
}
@@ -1671,7 +1672,6 @@ function RegionFilter(regions) {
"SG": "🇸🇬",
"JP": "🇯🇵",
"UK": "🇬🇧",
"KR": "🇰🇷"
};
return {
name: "Region Filter",