[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ampc ac831c4f29 018/111: Rebuild internal song database
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ampc ac831c4f29 018/111: Rebuild internal song database if the tag browser change. |
Date: |
Tue, 20 Feb 2024 18:16:36 -0500 (EST) |
branch: externals/ampc
commit ac831c4f29a1d2149021118c3761875fc27988a1
Author: Christopher Schmidt <christopher@ch.ristopher.com>
Commit: Christopher Schmidt <christopher@ch.ristopher.com>
Rebuild internal song database if the tag browser change.
---
ampc.el | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/ampc.el b/ampc.el
index a35025077b..f4ca17a5c0 100644
--- a/ampc.el
+++ b/ampc.el
@@ -246,6 +246,7 @@ This hook is called as the first thing when ampc is
started."
(make-variable-buffer-local 'ampc-dirty)
(defvar ampc-internal-db nil)
+(defvar ampc-internal-db-format nil)
(defvar ampc-status nil)
;;; *** mode maps
@@ -716,7 +717,7 @@ This hook is called as the first thing when ampc is
started."
(playlist
(ampc-update-playlist))
((tag song)
- (if ampc-internal-db
+ (if (equal ampc-internal-db-format (ampc-tags))
(ampc-fill-tag-song)
(ampc-send-command 'listallinfo)))
(status
@@ -1046,7 +1047,7 @@ This hook is called as the first thing when ampc is
started."
when (string-match "^changed: \\(.*\\)$" subsystem)
do (case (intern (match-string 1 subsystem))
(database
- (setf ampc-internal-db nil)
+ (setf ampc-internal-db-format nil)
(ampc-set-dirty 'tag t)
(ampc-set-dirty 'song t))
(output
@@ -1077,13 +1078,23 @@ This hook is called as the first thing when ampc is
started."
"ampc supports MPD 0.15.0 and later"))))
(defun ampc-fill-internal-db ()
- (setf ampc-internal-db (ampc-create-tree))
+ (setf ampc-internal-db (ampc-create-tree)
+ ampc-internal-db-format (ampc-tags))
(loop while (search-forward-regexp "^file: " nil t)
do (save-restriction
(ampc-narrow-entry)
(ampc-fill-internal-db-entry)))
(ampc-fill-tag-song))
+(defun ampc-tags ()
+ (loop for w in (ampc-windows)
+ for tag = (with-current-buffer (window-buffer w)
+ (when (eq (car ampc-type) 'tag)
+ (plist-get (cdr ampc-type) :tag)))
+ when tag
+ collect tag
+ end))
+
(defun ampc-fill-internal-db-entry ()
(loop
with data-buffer = (current-buffer)
@@ -1612,7 +1623,7 @@ ampc is connected to."
(setf ampc-connection nil
ampc-buffers nil
ampc-all-buffers nil
- ampc-internal-db nil
+ ampc-internal-db-format nil
ampc-working-timer nil
ampc-outstanding-commands nil
ampc-status nil)
- [elpa] externals/ampc edda56364f 077/111: * ampc.el (ampc-synchronous-commands): New constant., (continued)
- [elpa] externals/ampc edda56364f 077/111: * ampc.el (ampc-synchronous-commands): New constant., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 8357bd6679 078/111: * ampc.el (ampc-configure-frame): Reorder update statements to guarantee correct, Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 1008d25458 087/111: * ampc.el: Minor optimizations and doc fixes., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc c930356366 089/111: * ampc.el: Track windows., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 481253313e 090/111: * ampc.el (ampc-fix-pos, ampc-move-impl): Remove., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 6b96b2215e 093/111: * ampc.el: Optimise parsing of MPD's output., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 11be30d5c1 096/111: * ampc.el (ampc-send-command): Allow all other keys in PROPS. Store PROPS in, Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 26c78cf4a5 108/111: * ampc.el: Fix compilation warnings, Stefan Monnier, 2024/02/20
- [elpa] externals/ampc b89aa28b49 001/111: Initial commit., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc e301604aa0 012/111: Add commentary and code tags., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc ac831c4f29 018/111: Rebuild internal song database if the tag browser change.,
Stefan Monnier <=
- [elpa] externals/ampc 84efcaa16d 044/111: * ampc: Bump version to 0.1.2., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc bdb75f9ab9 051/111: * ampc.el (ampc-mode-map): Add checkboxes to the toggle menu items., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 3c81462de0 058/111: * ampc.el: Add tool-bar., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc c3c36d6a5e 060/111: * ampc.el: Add mouse support., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc f0462f2d8c 061/111: * ampc.el (ampc): Change the name of the internal communication buffer to, Stefan Monnier, 2024/02/20
- [elpa] externals/ampc bb5ba9b2bb 068/111: * ampc.el: Add ampc-mini, a command to select the song to play via, Stefan Monnier, 2024/02/20
- [elpa] externals/ampc effd06f0d8 072/111: * ampc.el: Add mouse support for playlist commands., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc cd2a3a93a6 074/111: * ampc.el: Doc simplifications., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 0941e8d180 079/111: * ampc.el: Make ampc synchronous., Stefan Monnier, 2024/02/20
- [elpa] externals/ampc 2b4cbc7db9 088/111: * ampc.el: Use tab-stop-list for tabulated lists., Stefan Monnier, 2024/02/20