A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
blob: e7a079f1e2106d9ed9be58b34ff5df542bbcb507 (340 bytes)[doc][blame][raw]
1
#!/bin/bash3
id="$1"4
echo "$id"5
ext="$2"6
url=$(psql verbal -c "select icon from station where id = $id;" -t | xargs echo -n)7
curl -sL "$url" -o "logo.$ext"8
color=$(echo $(convert "logo.$ext" -colors 1 -unique-colors txt:) | awk '{print $8}')9
echo "$color"10
psql verbal -c "update station set color = '$color' where id = $id;"11
rm "logo.$ext"