[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emms-help] Re: Randomize playlist
From: |
Jorgen Schaefer |
Subject: |
Re: [emms-help] Re: Randomize playlist |
Date: |
Thu, 23 Mar 2006 04:36:36 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Leon <address@hidden> writes:
>> You can always M-x emms-shuffle after loading. If you don't like
>> that, you can also copy the source definition for directory or
>> directory-tree from emms-source-file.el and add to the end:
>>
>> (funcall emms-playlist-shuffle-function)
>
> It seems by default *Music* buffer is read only otherwise emms-shuffle
> works fine.
The following should work:
(define-emms-source directory-tree-shuffled (dir)
"An EMMS source for multiple directory trees - either DIR, or the
value of `emms-source-file-default-directory'. The tracks are
shuffled after insertion."
(interactive (list
(emms-read-directory-name "Play directory tree: "
emms-source-file-default-directory
emms-source-file-default-directory
t)))
(emms-source-directory-tree dir)
(funcall emms-playlist-shuffle-function))
After evaluating this, you should be able to use
M-x emms-play-directory-tree-shuffled
>> If you want to always play the same directory, you can also do
>> this:
>>
>> (define-emms-combined-source my-stuff t
>> '((emms-source-directory-tree "~/music/my-stuff/")))
> I use (setq emms-source-file-default-directory "/home/common/Music")
> Is it the same?
Nope. `emms-source-file-default-directory' only sets the default
entry for `emms-play-directory-tree' and friends. The code above
defines new commands - `emms-play-my-stuff' and
`emms-add-my-stuff', specifically - that don't ask anything, but
just play the given directory.
Greetings,
-- Jorgen
--
((email . "address@hidden") (www . "http://www.forcix.cx/")
(gpg . "1024D/028AF63C") (irc . "nick forcer on IRCnet"))