emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emms-help] adding new music files to the emms-cache


From: Dirk-Jan C . Binnema
Subject: [emms-help] adding new music files to the emms-cache
Date: Mon, 24 Jan 2011 23:17:15 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.0 Mule/6.0 (HANACHIRUSATO)

Hi all,

I'm fairly happy with EMMS, but it seems I misunderstand some of the basics. A
typical usecase, I'd like to add some new music to the cache so I can see it
in the browser; to do this, I have a function

--8<---------------cut here---------------start------------->8---
(defun djcb-emms-update-cache()
  "update the EMM-cache by (re)scanning all new/updated files
under `emms-source-file-default-directory'"
  (interactive)
  (with-temp-buffer
    ;; get a list of new/updated files 
    (shell-command (concat
                     "find " emms-source-file-default-directory 
                     " -type f -a -newer " emms-cache-file))
    (let ((count 0))
      (apply (lambda (fname)
               (message "update %s" fname)
               (emms-add-file fname)
               (setq count (+ 1 count)))
        (split-string  (buffer-string) "[\n\r]+"))
      (emms-cache-dirty)
      (emms-cache-save)
      (message "EMMS-cache: updated %d file(s)" count))))
--8<---------------cut here---------------end--------------->8---

However, this seems not to work for some reason -- I can see newly added files
under 'misc/misc' (it seems for some reason the metadata is not recognized);
and for many of the files, when I start playing them (C-j), I get an error
like:

emms-player-start: Don't know how to play track: (*track* (type . playlist)
(name . "/home/djcb/Music/foo/bar/cuux.mp3") (metadata))

I.e, emms sees it as playlist, not as a file. I probably misunderstand
something, can someone enlighten me?

Thanks in advance,
Dirk.

-- 
Dirk-Jan C. Binnema                  Helsinki, Finland
e:address@hidden           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C



reply via email to

[Prev in Thread] Current Thread [Next in Thread]