handle mediaplayer hash collisions between folders;

when switching to another folder with identical filenames, the
mediaplayer would get confused and think it was the same files,
messing up the playback order
This commit is contained in:
ed 2024-03-13 15:30:47 +00:00
parent 645bb5c990
commit 206af8f151

View file

@ -2323,7 +2323,7 @@ function seek_au_sec(seek) {
function song_skip(n, dirskip) { function song_skip(n, dirskip) {
var tid = mp.au ? mp.au.tid : null, var tid = mp.au && mp.au.evp == get_evpath() ? mp.au.tid : null,
ofs = tid ? mp.order.indexOf(tid) : -1; ofs = tid ? mp.order.indexOf(tid) : -1;
if (dirskip && ofs + 1 && ofs > mp.order.length - 2) { if (dirskip && ofs + 1 && ofs > mp.order.length - 2) {
@ -8175,7 +8175,7 @@ function reload_mp() {
plays[a].parentNode.innerHTML = '-'; plays[a].parentNode.innerHTML = '-';
mp = new MPlayer(); mp = new MPlayer();
if (mp.au && mp.au.tid) { if (mp.au && mp.au.tid && mp.au.evp == get_evpath()) {
var el = QS('a#a' + mp.au.tid); var el = QS('a#a' + mp.au.tid);
if (el) if (el)
clmod(el, 'act', 1); clmod(el, 'act', 1);