- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| lmon | ||
| lmplay | ||
| lmplay-completion | ||
| mute | ||
| PKGBUILD | ||
| README.md | ||
lmplay
General
lmplay is a script to control your lyrion music server for some basic operations. Its main usage is to command your lyrion server to play a given radio station. It uses the station list radio_stations, which has more than 900 stations included.
List of functionality
- play a pre-configured radio station
- play any stream by URL
- play a local file (local means: file on the host running lms)
- play/stop/pause/unpause/mute/unmute any connected player
- sync/unsync players
- skip current title, play next one from the playlist
- get the current playlist
- get the current title/artist/album
- get a complete list of pre-configured radiostations
- control the volume of your player
- shuffle/repeat/clear your playlist
- trigger a rescan of your music library
- default-values can be set as environment variables
- comes with bash-completion
Usage
lmplay - tell Lyrion Music Server to play a given radio station
usage: lmplay [OPTIONS] [station|COMMAND]
OPTIONS
-h|--help show this help screen
-s|--station s play station s
-l|--lmserver s host of LMS [localhost]
-p|--port p port of LMS [9000]
-P|--sbport p port for squeezebox protocol [9090]
-a|--add instead of replacing the current playlist, add the
given station to the end of the current playlist
-a|--append synonym for -add
-i|--insert instead of replacing the current playlist,
play the given station after the current song
-c|--client c hostname or IP of client [choosen by LMS]
-C|--config c use stationlist c instead of
/usr/share/radio_tv_stations/radio_stations
-u|--url u url to play
-v|--verbose show generated url
-V|--version show version and exit
-x|--execute execute a single COMMAND on lms. See below.
-g|--getstations table of all known stations and their urls
--listcommands shortlist of all implemented commands (for bash completion)
--liststations shortlist of all known stations (for bash completion)
COMMANDS
pause toggle pause/unpause
stop stop the player
play start playing
next play next from playlist
prev play previous from playlist
repeat_title repeat current title
repeat_list repeat current playlist
repeat_off don't repeat anything
shuffle toggle shuffle (off -> titles -> albums -> off)
shuffle_title shuffle titles
shuffle_off don't shuffle
clearlist delete the current playlist
sync c2 add c2 to syncgroup of client
unsync remove client from its syncgroup
getsync get which players are synced
mute toggle muting
volume val change volume abs 0..100
rel -100..+100
volup,vu short for -x volume +5
voldown,vd short for -x volume -5
rescan trigger rescan of music library
status get the current playlist
curr get the current title/artist/album
power toggle on/off
on switch on
off switch off
ENVIRONMENT
LMSERVER default host of LMServer [not set]
LMPORT default html port of LMServer [not set]
LMSBPORT default squeezebox port of LMServer [not set]
LMCLIENT default IP/hostname LMClient [not set]
If no radio station is given on the command line, and yad is installed, start yad with a graphical dialog, where you can choose a station.
Installation
Dependencies
- radio_stations, should be installed as /usr/share/radio_tv_stations/radio_stations
- curl to talk to your lyrion music server
- dig from the package bind, to resolve hostnames to ip-addresses
- optional: yad for graphical selection of radio station (if none is given on the command line)
Program installation
sudo install -D -m 644 lmplay-completion /usr/share/bash-completion/completions/lmplay
sudo install -D -m 755 lmplay /usr/bin/lmplay
Arch users use the PKGBUILD (be sure to have installed radio_stations before, also via makepkg):
makepkg -sic
Notes
- if you have more than one client (players), choose the wanted one with -c hostname-or-ip-of-player
- there are many, many stations from you radio, beginning with
- er_ (exclusive radio)
- cr_ (classical radio)
- cmr_ (country music radio)
- boom_ (boomerang)
- I don't check every station every day, so you surely will find some dead stations
Examples
play the pre-configured station www.dylanradio.com:
lmplay dyl
pause your squeezebox, which has hostname kitchenradio:
lmplay pause --client kitchenradio
play pre-configured station Radio Paradise after the current title:
lmplay --insert paradise
add Classical Radio Sir Simon Rattle at the end of the playlist:
lmplay --add cr_simonrattle
listen part one of the Seelentanz-podcast via URL:
lmplay --url 'https://audio.podigee-cdn.net/197118-m-6e3f8c64de2cfc8836e886e4d8459f2a.mp3'
play a local file ('local' means: on the host running lms):
lmplay --url file:///path/to/musicfile.flac
pause the current playlist
lmplay pause
trigger a rescan of your music library
lmplay rescan
get the current playlist
lmplay status
get current title/artist/album
lmplay curr