-
Notifications
You must be signed in to change notification settings - Fork 184
Accessing music files, and covers
To be able to edit tags, calculate replaygain, load local covers, etc. Cantata needs to be able to access your music files. When Cantata queries MPD to obtain the library listing, MPD only informs Cantata of the relative path to the songs files within its music_directory
. Cantata has no way o determining what this music_directory
is set to - hence you need to configure this in Cantata by using its Music folder
setting.
- MPD's
music_directory
is configured as `/var/lib/mpd/music' - You have tracks within this, e.g.
/var/lib/mpd/music/Iron Maiden/The Killers/01 The Ides Of March.mp3
- When Cantata queries MPD for track listings, MPD only returns
Iron Maiden/The Killers/01 The Ides Of March.mp3
- Therefore, to access the file you need to set Cantata's
Music folder
setting to/var/lib/mpd/music
- Cantata accesses the file using
Music folder
+path from MPD
- e.g./var/lib/mpd/music
+Iron Maiden/The Killers/01 The Ides Of March.mp3
=/var/lib/mpd/music/Iron Maiden/The Killers/01 The Ides Of March.mp3
If MPD is on a different machine, then the only way for Cantata to access song files is for the MPD folder to be mounted
(or mapped
for Windows) somewhere on machine Cantata is installed. This the means MPD's music_directory
and Cantata's Music folder
settings will probably be quite different. You might have the following scenario:
- You MPD is installed on a Linux machine (e.g. a Raspberry Pi)
- MPD's
music_directory
set to/home/pi/MPD/music
- You have a track
/home/pi/MPD/music/Iron Maiden/The Killers/01 The Ides Of March.mp3
- On the machine with Cantata, you have mounted
/home/pi
as/home/user/raspberrypi
- Cantata's
Music folder
would then need to be set to/home/user/raspberrypi/MPD/music
- Cantata accesses the file using
Music folder
+path from MPD
- e.g./home/user/raspberrypi/MPD/music
+Iron Maiden/The Killers/01 The Ides Of March.mp3
=/home/user/raspberrypi/MPD/music/Iron Maiden/The Killers/01 The Ides Of March.mp3
For Windows this might be more like:
- On the machine with Cantata, you have mapped
/home/pi
asz:
- Cantata's
Music folder
would then need to be set toz:/MPD/music
- Cantata accesses the file using
Music folder
+path from MPD
- e.g.z:/MPD/music
+Iron Maiden/The Killers/01 The Ides Of March.mp3
=z:/MPD/music/Iron Maiden/The Killers/01 The Ides Of March.mp3
If you are unable to mount (or map) the MPD music folder from the machine with MPD (because you have not configured Samba, NFS, etc.) - then Cantata can access covers via a HTTP server running on the MPD machine. (Note that this is only for covers, and will not help with tag editing, etc). To do this:
- Configure a HTTP server (e.g.
lighttpd
) and make the MPD music folder accessible from this - Configure Cantata's
Music folder
using a HTTP URL. e.g.http://raspberrypi:8000/mpd/music
- Cantata will then look for
.jpg
and.png
cover files via the configured URL. The name of the cover file that Cantata will attempt to access will either becover
(e.g.cover.jpg
) or an alternative name as specified in Cantata's settings. The complete URL used would beMusic folder
+MPD music file path
+cover name
+.jpg or .png
. e.g. ForIron Maiden/The Killers/01 The Ides Of March.mp3
Cantata would attempt to fetchhttp://raspberrypi:8000/mpd/music/Iron Maiden/The Killers/cover.jpg