mirror of
https://github.com/9001/copyparty.git
synced 2026-01-12 15:52:39 -07:00
audioplayer: fix preload in huge folders;
it would skip to next folder instead of untruncating
This commit is contained in:
parent
ca6c4deaac
commit
8e2fb05ab8
|
|
@ -2548,6 +2548,9 @@ var mpui = (function () {
|
||||||
if (mpl.prescan_evp == evp)
|
if (mpl.prescan_evp == evp)
|
||||||
throw "evp match";
|
throw "evp match";
|
||||||
|
|
||||||
|
if (treectl.trunc)
|
||||||
|
return treectl.showmore(99999, repreload);
|
||||||
|
|
||||||
if (mpl.traversals++ > 4) {
|
if (mpl.traversals++ > 4) {
|
||||||
mpl.prescan_evp = null;
|
mpl.prescan_evp = null;
|
||||||
toast.inf(10, L.mm_nof);
|
toast.inf(10, L.mm_nof);
|
||||||
|
|
@ -3024,6 +3027,9 @@ function play(tid, is_ev, seek) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tn >= mp.order.length) {
|
if (tn >= mp.order.length) {
|
||||||
|
if (treectl.trunc)
|
||||||
|
return treectl.showmore(99999, next_song);
|
||||||
|
|
||||||
if (mpl.pb_mode == 'loop' || ebi('unsearch')) {
|
if (mpl.pb_mode == 'loop' || ebi('unsearch')) {
|
||||||
tn = 0;
|
tn = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -7520,7 +7526,7 @@ var treectl = (function () {
|
||||||
catch (ex) { }
|
catch (ex) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
r.showmore = function (n) {
|
r.showmore = function (n, cb) {
|
||||||
window.removeEventListener('scroll', r.tscroll);
|
window.removeEventListener('scroll', r.tscroll);
|
||||||
console.log('nvis {0} -> {1}'.format(r.nvis, n));
|
console.log('nvis {0} -> {1}'.format(r.nvis, n));
|
||||||
r.nvis = n;
|
r.nvis = n;
|
||||||
|
|
@ -7530,6 +7536,8 @@ var treectl = (function () {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
r.gentab(get_evpath(), r.lsc);
|
r.gentab(get_evpath(), r.lsc);
|
||||||
ebi('wrap').style.opacity = CLOSEST ? 'unset' : 1;
|
ebi('wrap').style.opacity = CLOSEST ? 'unset' : 1;
|
||||||
|
if (cb)
|
||||||
|
cb();
|
||||||
}, 1);
|
}, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue