Add tracker searches
This commit is contained in:
parent
283df753c5
commit
ed1c0a21f8
|
@ -27,7 +27,10 @@ export function search_criteria(text) {
|
|||
}
|
||||
const [field, value] = t.split(op);
|
||||
if (op == ":") {
|
||||
return { op: "ilike", field, value: `%${t}%` };
|
||||
if (field == "tracker") {
|
||||
return { op: "has", field: "tracker_urls", value };
|
||||
}
|
||||
return { op: "ilike", field, value };
|
||||
}
|
||||
if (!isNaN(numeral(value).value())) {
|
||||
return {
|
||||
|
|
|
@ -28,7 +28,9 @@ function SearchHelp(props) {
|
|||
"throttle_down": "throttle down in bits/sec",
|
||||
"transferred_up": "total transfer up in bits/sec",
|
||||
"transferred_down": "total transfer down in bits/sec",
|
||||
"tracker": "tracker url",
|
||||
"peers": "number of peers",
|
||||
"trackers": "number of trackers",
|
||||
"files": "number of files",
|
||||
};
|
||||
|
||||
|
@ -70,6 +72,7 @@ function SearchHelp(props) {
|
|||
<li>{searchLink("files>1")}</li>
|
||||
<li>{searchLink("files==1")}</li>
|
||||
<li>{searchLink("progress<0.1")}</li>
|
||||
<li>{searchLink("tracker:archlinux.org")}</li>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user