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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file RPiMusic-0.0.8.tar.gz.

File metadata

  • Download URL: RPiMusic-0.0.8.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

File hashes

Hashes for RPiMusic-0.0.8.tar.gz
Algorithm Hash digest
SHA256 0f81121d8b563819accfe5d194e8016cbdf60cce5cad1dc5af5cea1381992a96
MD5 77fbea38600a79ae3b74a3ac34008e4b
BLAKE2b-256 12180d5dec5f8b78e3762d4794795a6935014f137eca5204782ad6e0e241f8ca

See more details on using hashes here.

File details

Details for the file RPiMusic-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: RPiMusic-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

File hashes

Hashes for RPiMusic-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2c0902598b16b4df68b44ed8f28ad68c5e6c409de40866ceff13bc8c5a82ebad
MD5 4c71b2540dd5f43b12d9d5362de5c791
BLAKE2b-256 5eccbbf64daddd7206236ca2cae6e095429aa1f5227b8d9fc06d625e6586e173

See more details on using hashes here.

Supported by

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