Discussion:
[emms-help] Sample configuration for mpd+emms?
Julien Cubizolles
2016-03-07 12:50:18 UTC
Permalink
I'm having some trouble getting emms to use the mpd cache (atm it's
working only for mp3 files, neither ogg nor flac). Could someone using
emms-cache-set-from-mpd-all to populate the emms cache please post the
relevant parts of its .emacs file ?

Thanks in advance,

Julien.
Yoni Rabkin
2016-03-09 00:04:31 UTC
Permalink
Post by Julien Cubizolles
I'm having some trouble getting emms to use the mpd cache (atm it's
working only for mp3 files, neither ogg nor flac). Could someone using
emms-cache-set-from-mpd-all to populate the emms cache please post the
relevant parts of its .emacs file ?
I personally don't use mpd, but I'll take time to set it this up and
test the situation. Unfortunately, I can't promise to do so quickly.

P.S. Do you know of a place where I can get permissively licensed flac
files for testing?
--
"Cut your own wood and it will warm you twice"
Julien Cubizolles
2016-03-09 09:46:22 UTC
Permalink
Post by Yoni Rabkin
Post by Julien Cubizolles
I'm having some trouble getting emms to use the mpd cache (atm it's
working only for mp3 files, neither ogg nor flac). Could someone using
emms-cache-set-from-mpd-all to populate the emms cache please post the
relevant parts of its .emacs file ?
I personally don't use mpd, but I'll take time to set it this up and
test the situation. Unfortunately, I can't promise to do so quickly.
Thanks for looking at it anyway. I finally managed to get
emms-print-metada working so for now I can live without mpd to use the
browser.
Post by Yoni Rabkin
P.S. Do you know of a place where I can get permissively licensed flac
files for testing?
You can get some at http://www.eclassical.com/pages/24-bit-faq.html.

Julien.
Yoni Rabkin
2016-03-14 14:58:50 UTC
Permalink
Post by Julien Cubizolles
Post by Yoni Rabkin
Post by Julien Cubizolles
I'm having some trouble getting emms to use the mpd cache (atm it's
working only for mp3 files, neither ogg nor flac). Could someone using
emms-cache-set-from-mpd-all to populate the emms cache please post the
relevant parts of its .emacs file ?
I personally don't use mpd, but I'll take time to set it this up and
test the situation. Unfortunately, I can't promise to do so quickly.
Thanks for looking at it anyway. I finally managed to get
emms-print-metada working so for now I can live without mpd to use the
browser.
Post by Yoni Rabkin
P.S. Do you know of a place where I can get permissively licensed flac
files for testing?
You can get some at http://www.eclassical.com/pages/24-bit-faq.html.
I ended up downloading NIN Ghosts from the Internet Archive
(https://archive.org/details/nineinchnails_ghosts_I_IV) in both flac and
ogg format. Works perfect for me, including info.

My Emms mpd setup is simply:

(defun emms-setup-mpd-remote ()
(interactive)
(setq emms-player-mpd-server-name "music.local"
emms-player-mpd-server-port "6601"
emms-player-mpd-music-directory nil)
(add-to-list 'emms-info-functions 'emms-info-mpd)
(add-to-list 'emms-player-list 'emms-player-mpd))

Then I:

M-x emms-player-mpd-update-all
M-x emms-cache-set-from-mpd-all

..and that's it.
--
"Cut your own wood and it will warm you twice"
Julien Cubizolles
2016-04-19 15:30:01 UTC
Permalink
Post by Yoni Rabkin
I ended up downloading NIN Ghosts from the Internet Archive
(https://archive.org/details/nineinchnails_ghosts_I_IV) in both flac and
ogg format. Works perfect for me, including info.
I finally found the problem, if the metadata ALBUM ARTIST
fields, the mpd cache creates two ALBUMARTIST fields and somehow
emms-cache-set-from-mpd-all gets confused and doesn't put any artist
field...

Here is an example of some metadata, along with the corresponding
tag_cache and emms cache entries.

from metaflac:
--8<---------------cut here---------------start------------->8---
ALBUM ARTIST=PJ Harvey
ALBUMARTIST=PJ Harvey
ALBUMARTIST_CREDIT=PJ Harvey
ALBUMARTISTSORT=Harvey, PJ
ARTIST=PJ Harvey
ARTIST_CREDIT=PJ Harvey
ARTISTSORT=Harvey, PJ
--8<---------------cut here---------------end--------------->8---


tag_cache:
--8<---------------cut here---------------start------------->8---
song_begin: 02 The Ministry of Defence.flac
Time: 251.306000
Album: The Hope Six Demolition Project
AlbumArtist: PJ Harvey
AlbumArtist: PJ Harvey
AlbumArtistSort: Harvey, PJ
Artist: PJ Harvey
ArtistSort: Harvey, PJ
Date: 2016-04-15
Disc: 1
Disc: 1
Genre: Alternative
MUSICBRAINZ_ALBUMARTISTID: e795e03d-b5d5-4a5f-834d-162cfb308a2c
MUSICBRAINZ_ALBUMID: 63ba5add-9d2c-4e13-9684-62be576df8f2
MUSICBRAINZ_ARTISTID: e795e03d-b5d5-4a5f-834d-162cfb308a2c
MUSICBRAINZ_TRACKID: 01ba6311-45b4-44a3-b8bf-a794018ba469
Title: The Ministry of Defence
Track: 2
Track: 2
mtime: 1461049683--8<---------------cut here---------------end--------------->8---

emms cache:

--8<---------------cut here---------------start------------->8---
(puthash "/var/lib/mpd/music/NAS/Synology/BEETS/PJ Harvey/The Hope Six Demolition Project/02 The Ministry of Defence.flac" '(*track* (type . file) (name . "/var/lib/mpd/music/NAS/Synology/BEETS/PJ Harvey/The Hope Six Demolition Project/02 The Ministry of Defence.flac") (info-album . "The Hope Six Demolition Project") (info-playing-time . 251) (info-tracknumber . "1")) emms-cache-db)
--8<---------------cut here---------------end--------------->8---

Julien.
Yoni Rabkin
2016-04-20 15:50:27 UTC
Permalink
Post by Julien Cubizolles
Post by Yoni Rabkin
I ended up downloading NIN Ghosts from the Internet Archive
(https://archive.org/details/nineinchnails_ghosts_I_IV) in both flac and
ogg format. Works perfect for me, including info.
I finally found the problem, if the metadata ALBUM ARTIST
fields, the mpd cache creates two ALBUMARTIST fields and somehow
emms-cache-set-from-mpd-all gets confused and doesn't put any artist
field...
Here is an example of some metadata, along with the corresponding
tag_cache and emms cache entries.
I'll modify the metadata of the files I have and test with the cache
data as well. Thanks.
--
"Cut your own wood and it will warm you twice"
Julien Cubizolles
2016-04-20 19:32:18 UTC
Permalink
Post by Yoni Rabkin
I'll modify the metadata of the files I have and test with the cache
data as well. Thanks.
At the moment, I'm using a fork (https://github.com/jreinert/MPD) of mpd
that addresses this very issue ensuring that no duplicated entries are
created in the tag_cache. But it would of course be better for emms to
handle this kind of error in the tag_cache.

Julien.
Yoni Rabkin
2016-04-29 18:16:52 UTC
Permalink
Post by Julien Cubizolles
Post by Yoni Rabkin
I'll modify the metadata of the files I have and test with the cache
data as well. Thanks.
At the moment, I'm using a fork (https://github.com/jreinert/MPD) of
mpd that addresses this very issue ensuring that no duplicated entries
are created in the tag_cache. But it would of course be better for
emms to handle this kind of error in the tag_cache.
I'm sorry it has taken me so long to respond; the quotidian got the
better of me.

Since I'm unfamiliar with mpd I'd like to understand: is this a bug in
mpd which will be fixed upstream? Or is the point to make sure that Emms
doesn't get confused when reading from buggy software that provides
multiple, identical entries?
--
"Cut your own wood and it will warm you twice"
Yoni Rabkin
2016-04-29 21:30:55 UTC
Permalink
Post by Yoni Rabkin
Post by Julien Cubizolles
At the moment, I'm using a fork (https://github.com/jreinert/MPD) of
mpd that addresses this very issue ensuring that no duplicated entries
are created in the tag_cache. But it would of course be better for
emms to handle this kind of error in the tag_cache.
I'm sorry it has taken me so long to respond; the quotidian got the
better of me.
Thanks a lot for taking the time to look into this.
Post by Yoni Rabkin
Since I'm unfamiliar with mpd I'd like to understand: is this a bug in
mpd which will be fixed upstream?
To me it's a bug but the developper doesn't see it that way and won't
fix it. But I'm not the only one annoyed with it and someone patched
this problem in MPD
Post by Yoni Rabkin
Or is the point to make sure that Emms doesn't get confused when
reading from buggy software that provides multiple, identical entries?
I wanted to let you know however that at the moment emms gets so
confused that it ends up with a completely wrong database.
Also, have you seen my other message where I noticed that some entries
in a perfectly valid MPD database (without duplicates) seem to confuse
emms so that its entries mix up their titles/track numbers, in the emms
cache ? (http://article.gmane.org/gmane.emacs.emms.user/1768/)
That doesn't sound good. I'll look into that.
--
"Cut your own wood and it will warm you twice"
Loading...