indicate forced-randomized filenames

This commit is contained in:
ed 2023-02-04 15:18:09 +00:00
parent 2b644fa81b
commit b0db14d8b0
4 changed files with 9 additions and 4 deletions

View file

@ -3365,6 +3365,7 @@ class HttpCli(object):
"idx": ("e2d" in vn.flags),
"itag": ("e2t" in vn.flags),
"lifetime": vn.flags.get("lifetime") or 0,
"frand": bool(vn.flags.get("rand")),
"perms": perms,
"logues": logues,
"readme": readme,
@ -3377,6 +3378,7 @@ class HttpCli(object):
"acct": self.uname,
"perms": json.dumps(perms),
"lifetime": ls_ret["lifetime"],
"frand": bool(vn.flags.get("rand")),
"taglist": [],
"def_hcols": [],
"have_emp": self.args.emp,

View file

@ -155,6 +155,7 @@
sb_lg = "{{ sb_lg }}",
lifetime = {{ lifetime }},
turbolvl = {{ turbolvl }},
frand = {{ frand|tojson }},
u2sort = "{{ u2sort }}",
have_emp = {{ have_emp|tojson }},
txt_ext = "{{ txt_ext }}",

View file

@ -5537,7 +5537,7 @@ var treectl = (function () {
have_up2k_idx = res.idx;
have_tags_idx = res.itag;
lifetime = res.lifetime;
apply_perms(res.perms);
apply_perms(res);
fileman.render();
}
if (sel.length)
@ -5766,8 +5766,8 @@ var wfp_debounce = (function () {
})();
function apply_perms(newperms) {
perms = newperms || [];
function apply_perms(res) {
perms = res.perms || [];
var a = QS('#ops a[data-dest="up2k"]');
if (have_up2k_idx) {
@ -5841,6 +5841,8 @@ function apply_perms(newperms) {
(have_write || tds[a].getAttribute('data-perm') == 'read') ?
'table-cell' : 'none';
}
if (res.frand)
ebi('u2rand').parentNode.style.display = 'none';
if (up2k)
up2k.set_fsearch();

View file

@ -2918,7 +2918,7 @@ ebi('ico1').onclick = function () {
if (QS('#op_up2k.act'))
goto_up2k();
apply_perms(perms);
apply_perms({ "perms": perms, "frand": frand });
(function () {