sodface wrote: 
> 
> Is that for internet streams, local music or both?
> 
local music yes,  haven't tested streams 

> 
> //oh, and regarding netpbm being old, while true, many of the tools have
> been updated very recently.  The newer pam tools support transparency
> also which is a relatively recent addition apparently.  I think I might
> stick with it a bit longer as I'm getting the hang of piecing the
> various tools together and ultimately I think it 'll be the most light
> weight solution.  
> 
iirc netpbm won't do text, so you'll need another package in any case.
I'd assume GraphicsMagick will be the fastest / most light-weight
solution (single call / one package for doing everything).

Updated version (artist pic incl. caching - if you want to persist over
reboots, change /dev/shm to something on SD card)

Code:
--------------------
    
  #!/bin/bash
  
  function get_catt {
        echo $CURR|jq .$1|sed -e "s#'#ยด#g"|sed -e 's#"\(.*\)"#\1#g'
  }
  
  STATUS=$(curl -s -H "Content-Type: application/json" -X POST -d 
'{"id":1,"method":"slim.request","params":["aa:bb:cc:dd:ee:ff", 
["status",0,999,"tags:acgltys"]]}' "http://raspi3-64:9000/jsonrpc.js";)
  CI=$(echo ${STATUS}|jq '.result.playlist_cur_index | tonumber') 
  CURR=$(echo ${STATUS}|jq ".result.playlist_loop[$CI]")
  CTID=$(get_catt id)
  CAID=$(get_catt artist_id)
  
  [ -f /dev/shm/lmss-artist.$CAID.png ] || curl -s -o 
/dev/shm/lmss-artist.$CAID.png 
"http://raspi3-64:9000/imageproxy/mai/artist/$CAID/image_300x300_m";
  
  curl -s -o - "http://raspi3-64:9000/music/current/cover_850x850_o";|convert 
-resize "x850" -antialias -background grey15 -stroke grey50 -fill white  -font 
Dosis-Medium -pointsize 48 -gravity SouthEast -extent 1600x1040 -gravity 
NorthWest -draw "text 10,10 '$(get_catt tracknum). $(get_catt title) 
($(get_catt year))' text 10,80 '$(get_catt album)' text 10,150 '$(get_catt 
artist)'" -draw "image over 0,740 0,0 '/dev/shm/lmss-artist.$CAID.png'"  - 
'/dev/shm/lmsscreen.jpg'
  
--------------------


26102


+-------------------------------------------------------------------+
|Filename: lmsscreen.jpg                                            |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=26102|
+-------------------------------------------------------------------+


SW: 'Web UI for LMS'
(http://forums.slimdevices.com/showthread.php?98186-Announce-Alternative-Web-Interface-(beta))
| 'Playlist Editor / Generator'
(http://forums.slimdevices.com/showthread.php?108199-Announce-LMS-Playlist-Editor)
| 'Music Classification'
(http://forums.slimdevices.com/showthread.php?108278-Announce-Essentia-Integration-music-classification-(moods-genres-))
| 'Similar Music'
(http://forums.slimdevices.com/showthread.php?108495-Announce-LMSmusly-play-similar-music)
| 'LMSlib2go' (https://www.nexus0.net/pub/sw/lmslib2go/)
HowTos: 'build a self-contained LMS'
(http://forums.slimdevices.com/showthread.php?99648-Howto-build-a-self-contained-LMS)
| 'Ogg Opus'
(http://forums.slimdevices.com/showthread.php?107011-Howto-play-Ogg-Opus-files)
| 'Bluetooth/ALSA'
(http://forums.slimdevices.com/showthread.php?107230-Howto-Bluetooth-streaming-to-from-LMS-(ALSA-only-no-PulseAudio))
------------------------------------------------------------------------
Roland0's Profile: http://forums.slimdevices.com/member.php?userid=56808
View this thread: http://forums.slimdevices.com/showthread.php?t=109694

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to