Displaying the liner notes of the current replay
Posted by: nbpf on 01 February 2015
Most control applications for replay systems based on MPD/UPnP client-server architectures allow us to access cover art, artist biography and a lot of more or less interesting information but not the liner notes that we have bought together with our music files.
To me, this limitation seems unacceptable, in particular in applications which have been designed for conscious listeners and enthusiasts. I have carefully organized my music collection and I have a lot of nice booklets. Wouldn't it be nice to select an album to play and browse its liner notes by just pressing a key on my tablet computer?
Today I followed a suggestion from the MPD forum and implemented a simple and, I believe, effective solution. I thought I would share it: the shell script
#!/bin/sh
server="fitpc3"
musicdir="music"
viewer="xpdf -fullscreen"
tmpfile="/home/nicola/tmp/booklet.pdf"
if wget -q "http://$server/$musicdir/$(dirname "$(mpc -h $server current --format '%file%')")/booklet.pdf" -O $tmpfile;
then $viewer $tmpfile; rm $tmpfile;
else echo "booklet not found"
fi
grabs the liner notes from my server, fires up a PDF viewer and displays the booklet fullscreen. The assumptions for the script to work for you are that
- you have a server on your WLAN ("fitpc3" in my case) running MPD and an HTTP server,
- your HTTP server grants you access to a folder where you have stored your music data ("music" in my case),
- you have stored your booklets in pdf format in the same folder of your music data and in a file named "booklet.pdf",
- you run the script on a Unix machine where you have installed "wget", "mpc" and a pdf-viewer ("xpdf" in my case).
It should not be too difficult to modify the script to work for other OSs and for a UPnP server. Maybe Naim could add this functionality to their iOS and Android apps via a suitable button. Then we still would not be able to search our music files according to our own classification tags. But at least we could read our album liner notes.