[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/listen 278c97695a 11/15: Change: (listen-queue) Update
From: |
ELPA Syncer |
Subject: |
[elpa] externals/listen 278c97695a 11/15: Change: (listen-queue) Update current track when changed |
Date: |
Tue, 5 Mar 2024 21:58:15 -0500 (EST) |
branch: externals/listen
commit 278c97695a68c5c164c3b82186007f51a847bccb
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Change: (listen-queue) Update current track when changed
---
listen-queue.el | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/listen-queue.el b/listen-queue.el
index 496bf7f2b1..579e5f7952 100644
--- a/listen-queue.el
+++ b/listen-queue.el
@@ -109,13 +109,24 @@ intended to be set from the `listen-menu'."
(make-vtable
:columns
(list (list :name "▶" :primary 'descend
- :getter (lambda (track _table)
- ;; 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)))
- "▶" " ")))
+ :getter
+ (lambda (track _table)
+ ;; 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)))
+ (progn
+ (unless (eq (listen-queue-current
listen-queue) track)
+ ;; HACK: Update current track in queue. I
don't know a
+ ;; more optimal place to do this.
+ (setf (seq-elt (listen-queue-tracks
listen-queue)
+ (seq-position
(listen-queue-tracks listen-queue)
+
(listen-queue-current listen-queue)))
+ track
+ (listen-queue-current listen-queue)
track))
+ "▶")
+ " ")))
(list :name "#" :primary 'descend
:getter (lambda (track _table)
(cl-position track (listen-queue-tracks
queue))))
- [elpa] externals/listen 4aeef331a6 08/15: Fix: (listen-queue) Go to current track, (continued)
- [elpa] externals/listen 4aeef331a6 08/15: Fix: (listen-queue) Go to current track, ELPA Syncer, 2024/03/05
- [elpa] externals/listen addae17d8b 01/15: Change: Use originalyear/originaldate in preference to date field, ELPA Syncer, 2024/03/05
- [elpa] externals/listen a7da346ac1 10/15: Add: (listen-lighter-format-rating), ELPA Syncer, 2024/03/05
- [elpa] externals/listen 99fdff93ea 12/15: Tidy: Rename listen--player to listen-current-player, ELPA Syncer, 2024/03/05
- [elpa] externals/listen 903990570a 15/15: Release: v0.5, ELPA Syncer, 2024/03/05
- [elpa] externals/listen 01d4c850c9 03/15: Meta: Add .dir-locals.el, ELPA Syncer, 2024/03/05
- [elpa] externals/listen 9117c39318 05/15: Fix: (listen-queue) Mark current track by comparing filenames, ELPA Syncer, 2024/03/05
- [elpa] externals/listen c71ac57e54 06/15: Tidy: "Reload" rather than "refresh" tracks, ELPA Syncer, 2024/03/05
- [elpa] externals/listen cfaa1832f4 04/15: Change: (listen-queue) Right-align track numbers, ELPA Syncer, 2024/03/05
- [elpa] externals/listen 5e3ee61bf3 09/15: Fix: (listen-queue-track-revert) Include etc metadata, ELPA Syncer, 2024/03/05
- [elpa] externals/listen 278c97695a 11/15: Change: (listen-queue) Update current track when changed,
ELPA Syncer <=
- [elpa] externals/listen ab4d75829a 13/15: Docs: Add screenshot, ELPA Syncer, 2024/03/05
- [elpa] externals/listen 64a23bfe69 14/15: Meta: Add .elpaignore, ELPA Syncer, 2024/03/05