[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emms-help] [PATCH] emms-tag-editor-tag-flac do not replace tags
From: |
Daniel Dehennin |
Subject: |
[emms-help] [PATCH] emms-tag-editor-tag-flac do not replace tags |
Date: |
Sat, 06 Jul 2013 18:10:34 +0200 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) |
The following changes since commit c763540c3473e06405825d6f1679f97b99567de9:
Play tracks randomly (2013-05-30 18:19:50 +0200)
are available in the git repository at:
git://git.baby-gnu.net/emms tags/hotfix/duplicated-flac-tags
for you to fetch changes up to 7a3b55b94f14ee9b462625df64f60bc18499fecc:
emms-tag-editor-tag-flac do not replace tags (2013-07-06 18:05:59 +0200)
----------------------------------------------------------------
Avoids FLAC tags duplication with old values.
----------------------------------------------------------------
Daniel Dehennin (1):
emms-tag-editor-tag-flac do not replace tags
lisp/emms-tag-editor.el | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/lisp/emms-tag-editor.el b/lisp/emms-tag-editor.el
index 06041c5..2c28b96 100644
--- a/lisp/emms-tag-editor.el
+++ b/lisp/emms-tag-editor.el
@@ -143,19 +143,25 @@ See also `emms-tag-editor-tag-file' and
`emms-tag-editor-tag-ogg'.")
"Commit changes to an FLAC file according to TRACK."
(require 'emms-info-metaflac)
(with-temp-buffer
- (let (need val)
+ (let ((tags '("artist" "composer" "performer" "title" "album"
"tracknumber" "discnumber" "date" "genre" "note"))
+ need val)
(mapc (lambda (tag)
(let ((info-tag (intern (concat "info-" tag))))
(when (> (length (setq val (emms-track-get track info-tag))) 0)
(insert (upcase tag) "=" val "\n"))))
- '("artist" "composer" "performer" "title" "album" "tracknumber"
"discnumber" "date" "genre" "note"))
+ tags)
(when (buffer-string)
- (funcall #'call-process-region (point-min) (point-max)
- emms-info-metaflac-program-name nil
- (get-buffer-create emms-tag-editor-log-buffer)
- nil
- "--import-tags-from=-"
- (emms-track-name track))))))
+ (apply #'call-process-region (point-min) (point-max)
+ emms-info-metaflac-program-name nil
+ (get-buffer-create emms-tag-editor-log-buffer)
+ nil
+ (append
+ (mapcar (lambda (tag)
+ (concat "--remove-tag=" tag))
+ tags)
+ '("--import-tags-from=-")
+ '("--")
+ (list (emms-track-name track))))))))
(defun emms-tag-editor-tag-ogg (track)
"Commit changes to an OGG file according to TRACK."
--
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF
pgpJP7jI9tcyB.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [emms-help] [PATCH] emms-tag-editor-tag-flac do not replace tags,
Daniel Dehennin <=