mirror of
https://github.com/9001/copyparty.git
synced 2026-01-12 15:52:39 -07:00
audioplayer: fix mode=stop panic; closes #1022
js would panic if switching to prev song at start of folder
This commit is contained in:
parent
ec00dc18ca
commit
a28503e805
|
|
@ -3019,9 +3019,6 @@ function play(tid, is_ev, seek) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tn >= mp.order.length) {
|
if (tn >= mp.order.length) {
|
||||||
if (mpl.pb_mode == 'stop')
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (mpl.pb_mode == 'loop' || ebi('unsearch')) {
|
if (mpl.pb_mode == 'loop' || ebi('unsearch')) {
|
||||||
tn = 0;
|
tn = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -3029,6 +3026,7 @@ function play(tid, is_ev, seek) {
|
||||||
treectl.ls_cb = next_song;
|
treectl.ls_cb = next_song;
|
||||||
return tree_neigh(1);
|
return tree_neigh(1);
|
||||||
}
|
}
|
||||||
|
else return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tn < 0) {
|
if (tn < 0) {
|
||||||
|
|
@ -3039,6 +3037,7 @@ function play(tid, is_ev, seek) {
|
||||||
treectl.ls_cb = last_song;
|
treectl.ls_cb = last_song;
|
||||||
return tree_neigh(-1);
|
return tree_neigh(-1);
|
||||||
}
|
}
|
||||||
|
else return;
|
||||||
}
|
}
|
||||||
|
|
||||||
tid = mp.order[tn];
|
tid = mp.order[tn];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue