branch: externals/listen
commit 9117c39318fef65fcc7a75b49fe8cc3adee83db8
Author: Adam Porter <[email protected]>
Commit: Adam Porter <[email protected]>
Fix: (listen-queue) Mark current track by comparing filenames
This is obviously less efficient, but more correct. It's just too
unintuitive for the user to "C-u g" on the queue buffer and have the
current track no longer marked.
---
README.org | 1 +
listen-queue.el | 11 +++++------
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/README.org b/README.org
index bd8cb46386..e5acd5c6b0 100644
--- a/README.org
+++ b/README.org
@@ -85,6 +85,7 @@ Use the command ~listen~ to show the Transient menu. From
there, it is--hopeful
*Fixes*
+ Increase timeout for reading track durations.
+ Command ~listen-queue-deduplicate~ first removes any tracks not backed by a
file.
++ In queue buffer, mark current track by comparing filename (rather than
internal track identity).
** v0.4
diff --git a/listen-queue.el b/listen-queue.el
index fe1b042ce4..9b55788cd3 100644
--- a/listen-queue.el
+++ b/listen-queue.el
@@ -110,12 +110,11 @@ intended to be set from the `listen-menu'."
:columns
(list (list :name "▶" :primary 'descend
:getter (lambda (track _table)
- (if (eq track (listen-queue-current queue))
- ;; FIXME: If track metadata changes
during playback and the
- ;; user refreshes the queue from disk,
the currently playing
- ;; track won't match anymore. (The
obvious solution is to
- ;; compare filenames, but that would
seem wasteful for a
- ;; large queue, so let's defer that for
now.)
+ ;; We compare filenames in case the queue's
files
+ ;; have been refreshed from disk, in which
case
+ ;; the track objects would no longer be
`eq'.
+ (if (equal (listen-track-filename track)
+ (listen-track-filename
(listen-queue-current queue)))
"▶" " ")))
(list :name "#" :primary 'descend
:getter (lambda (track _table)