Skip to main content

Play URLs from AMQP messages via mpv

Project description

RPiMusic

Get AMQP message, play URL (via mpv, currently). This script creates an exchange and a queue in the specified AMQP vhost. Only ssl-enabled AMQP connections are supported. The exchange is named "Xall", type direct. The queue is named "RPiMusic_uuid", with uuid being the uuid from the config file.

Example rpimusic.conf

{ 
  "amqp_url": "amqp://user:password@amqp.example.com/examplevhost",
  "fallback_playlist_url": "http://radio.example.com/playlist.m3u",
  "url_cache_file": "/var/lib/rpimusic/playlistcache.json",
  "uuid": "c788176f2e4747f3ae2fe15083d97dce"
}

Example systemd unit file

[Unit]
Description=Listens for AMQP messages containing URLs and plays them via mpv
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
User=rpimusic
ExecStart=/opt/venv/bin/rpimusicd --config /etc/rpimusic.conf
Restart=on-failure
RestartSec=30
RestartPreventExitStatus=255

[Install]
WantedBy=multi-user.target

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

RPiMusic-0.0.8.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

RPiMusic-0.0.8-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page