diff --git a/app.py b/app.py index 861a5bf..da364ef 100755 --- a/app.py +++ b/app.py @@ -246,4 +246,4 @@ def index(path): return render_template("browse.html") if __name__ == "__main__": - app.run(debug=True, host='0.0.0.0') + app.run(debug=True, host='0.0.0.0') \ No newline at end of file diff --git a/static/app.js b/static/app.js index 2f8cf58..2ca52e0 100644 --- a/static/app.js +++ b/static/app.js @@ -1,3 +1,7 @@ +// Define global variables to track music files and the current index. +let currentMusicFiles = []; // Array of objects with at least { path, index } +let currentMusicIndex = -1; // Index of the current music file + // Helper function: decode each segment then re-encode to avoid double encoding. function encodeSubpath(subpath) { if (!subpath) return ''; @@ -46,15 +50,19 @@ function renderContent(data) { // Render files. if (data.files.length > 0) { contentHTML += '