From 37eadfdee87ac822923638b3e2b53abcd6b0ba57 Mon Sep 17 00:00:00 2001 From: ulrich Date: Fri, 09 Apr 2021 06:57:44 +0000 Subject: [PATCH] ID3 Tags --- www/ui/js/app.js | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/www/ui/js/app.js b/www/ui/js/app.js index a28d20b..abd781f 100644 --- a/www/ui/js/app.js +++ b/www/ui/js/app.js @@ -147,8 +147,12 @@ } self.media_liste(); } else { - self.removeClassMulti('selected'); - t.classList.add('selected'); + if(t.classList.contains('selected')) { + self.addSelectedTitel(); + } else { + self.removeClassMulti('selected'); + t.classList.add('selected'); + } //self.selTitel = new Titel(t.textContent, self.ortPfad); } }); @@ -176,9 +180,9 @@ var titelName = document.querySelector(".selected").textContent; var titel; if(self.mediaPfad.endsWith('/')) { - titel = new Titel(self.mediaPfad + titelName, self.ortPfad); + titel = new Titel(titelName, self.mediaPfad, self.ortPfad); } else { - titel = new Titel(self.mediaPfad + '/' + titelName, self.ortPfad); + titel = new Titel(titelName, self.mediaPfad + '/', self.ortPfad); } var plname = document.querySelector('#playlist').value; self.http_put('../api/alist/' + plname, JSON.stringify(titel), function(responseText) { @@ -707,7 +711,8 @@ this.name = n; } -function Titel(n, u) { +function Titel(n, p, u) { this.katalogUrl = u; + this.pfad = p; this.name = n; } \ No newline at end of file -- Gitblit v1.9.3