opensubscriber
   Find in this group all groups
 
Unknown more information…

e : emms-help@gnu.org 25 January 2011 • 5:17AM -0500

[emms-help] adding new music files to the emms-cache
by Dirk-Jan C. Binnema

REPLY TO AUTHOR
 
REPLY TO GROUP




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:djcb@djcb...           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

_______________________________________________
Emms-help mailing list
Emms-help@gnu....
http://lists.gnu.org/mailman/listinfo/emms-help

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.