From c7f826dbbe366ab3a80b63fb4494cb7a249e0a86 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 19 Oct 2023 23:57:27 +0000 Subject: [PATCH] search by upload time --- copyparty/u2idx.py | 5 +++++ copyparty/web/browser.css | 2 ++ copyparty/web/browser.js | 13 ++++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/copyparty/u2idx.py b/copyparty/u2idx.py index be96b7d7..c83969c3 100644 --- a/copyparty/u2idx.py +++ b/copyparty/u2idx.py @@ -181,6 +181,11 @@ class U2idx(object): is_date = True have_up = True + elif v == "up_at": + v = "up.at" + is_date = True + have_up = True + elif v == "path": v = "trim(?||up.rd,'/')" va.append("\nrd") diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 59879600..cd52c5b2 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -1475,6 +1475,8 @@ input.eq_gain { width: calc(100% - 2em); margin: .3em 0 0 1.4em; } +@media (max-width: 130em) { #srch_form.tags #tq_raw { width: calc(100% - 34em) } } +@media (max-width: 95em) { #srch_form.tags #tq_raw { width: calc(100% - 2em) } } #tq_raw td+td { width: 100%; } diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index d7f31cf7..c9cd022e 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -354,11 +354,14 @@ var Ls = { "s_rd": "path", "s_fn": "name", "s_ta": "tags", + "s_ua": "up@", "s_ad": "adv.", "s_s1": "minimum MiB", "s_s2": "maximum MiB", "s_d1": "min. iso8601", "s_d2": "max. iso8601", + "s_u1": "uploaded after", + "s_u2": "and/or before", "s_r1": "path contains   (space-separated)", "s_f1": "name contains   (negate with -nope)", "s_t1": "tags contains   (^=start, end=$)", @@ -828,11 +831,14 @@ var Ls = { "s_rd": "sti", "s_fn": "navn", "s_ta": "meta", + "s_ua": "up@", "s_ad": "avns.", "s_s1": "større enn ↓ MiB", "s_s2": "mindre enn ↓ MiB", "s_d1": "nyere enn <dato>", "s_d2": "eldre enn", + "s_u1": "lastet opp etter", + "s_u2": "og/eller før", "s_r1": "mappenavn inneholder", "s_f1": "filnavn inneholder", "s_t1": "sang-info inneholder", @@ -4999,6 +5005,11 @@ document.onkeydown = function (e) { [ L.s_ad, ["adv", "adv", L.s_a1, "30", "key>=1A key<=2B .bpm>165"] + ], + [ + L.s_ua, + ["utl", "ut_min", L.s_u1, "14", "2007-04-08"], + ["utu", "ut_max", L.s_u2, "14", "2038-01-19"] ] ]; @@ -5143,7 +5154,7 @@ document.onkeydown = function (e) { } if (k.length == 3) { - q += k.replace(/sz/, 'size').replace(/dt/, 'date').replace(/l$/, ' >= ').replace(/u$/, ' <= ') + tv; + q += k.replace(/l$/, ' >= ').replace(/u$/, ' <= ').replace(/^sz/, 'size').replace(/^dt/, 'date').replace(/^ut/, 'up_at') + tv; continue; }