From 5da246f24f30da0e8686cf62ad2d4118ebbe990f Mon Sep 17 00:00:00 2001 From: "Franz A. Steffek" Date: Sat, 2 Jun 2018 14:27:18 +0200 Subject: [PATCH] Compare timestamps when deleting from playlist Comparing only the timestamps when deleting an item from the playlist, should remove it faster. --- interface.py | 2 +- templates/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface.py b/interface.py index 5727a65..1610f6b 100644 --- a/interface.py +++ b/interface.py @@ -90,7 +90,7 @@ def index(): var.playlist.extend(files) elif 'delete_music' in request.form: for item in var.playlist: - if str(item) == request.form['delete_music']: + if str(item[2]) == request.form['delete_music']: var.playlist.remove(item) break elif 'action' in request.form: diff --git a/templates/index.html b/templates/index.html index bddc691..27a574d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -84,8 +84,8 @@