ianhaynes wrote
Another thought - would song info be possible for radio and Spotify?
if it can help you, I made a little change for artist info when you're listening spotify (not perfect but it iworks for me)
first, you need to install netcat (the gnu one if asked):
pacman -S netcat
then, never forget to save your files before changes
cp /var/www/command/artist_info.sh /var/www/command/artist_info.sh.old
then modify /var/www/command/artist_info.sh like this:
nano /var/www/command/artist_info.sh
#!/bin/bash
daemon=`ps -ed|grep mpd|awk '{print $4}'`
if [ "$daemon" == "mpd" ]
then
artist_name=`mpc -f %artist% | head -n 1`
artist=`perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$artist_name"`
echo $artist
else
artist_name=`(echo status;sleep 0.1)|netcat -c localhost 6602|head -2|tail -1|cut -d "\"" -f 16 | iconv -f utf8 -t ascii//TRANSLIT`
artist=`perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$artist_name"`
echo $artist
fi
curl -s "http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&autocorrect=1&artist=$artist&api_key=ba8ad00468a50732a3860832eaed0882&format=json" |sed ':a;N;$!ba;s/\n/<\/br>/g'
then, you need to modify the php (once again, don't forget to save the original one!!)
nano /var/www/app/artist_info_ctl.php
look for those lines and do some comments:
//[/color]if ($activePlayer != 'MPD' && $redis->Get('artist-info')) {
echo sysCmd("sh /var/www/command/artist_info.sh")[1];
//}
Witched