From 206af8f1510eab851774f109dc2ff11812731ab4 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 13 Mar 2024 15:30:47 +0000 Subject: [PATCH] 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 --- copyparty/web/browser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 5c9ec3bc..ea872adf 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -2323,7 +2323,7 @@ function seek_au_sec(seek) { 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; if (dirskip && ofs + 1 && ofs > mp.order.length - 2) { @@ -8175,7 +8175,7 @@ function reload_mp() { plays[a].parentNode.innerHTML = '-'; 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); if (el) clmod(el, 'act', 1);