Skip to main content

Mopidy extension to automate music playback based on time of day

Project description

Latest PyPI version Travis CI build status Test coverage

Mopidy extension to automate music playback based on time of day.

Can be used in restaurants to play fitting music depending on time of day with no user input required.

Notice

  • Only tested with file:// backend.

  • This extension high-jacks many Mopidy events to control playback so does not play well with other extensions.

Consists of a frontend and simple web client.

Frontend

If no tracks are playing and a play event is received, or if playback ends, a random album will be added to the tracklist and playback started.

Album is chosen from one of 3 sections, based on time of day. After an album has been played, it will not play again until all other albums in it’s section has been played.

If volume is set higher than what is configured for the section, it will be lowered before playback starts.

Web Client

The web client is reached on url /auto/. It shows which track, artist and album is playing.

It has 3 buttons: Play / Pause, skip to next track and skip to next album.

It also has a volume control.

Installation

Install by running:

pip install Mopidy-Auto

Configuration

Before starting Mopidy, you must add configuration for Mopidy-Auto to your Mopidy configuration file:

[auto]
enabled = true

# URI where the sections folders are located
base_path = file:///Users/marcus/Media/Music/

# Max number of tracks that can be added from one folder. Set to 0 or lower to disable limit
max_tracks = 15

# Sections of different music activated depending on time of day. Currently locked to 3
# At what time this section gets active
s0_hour = 0
s0_minute = 0
# Folder name in where to find albums
s0_folder = Rap
# Decrease volume to this level if it is set higher when new folder is being played
s0_max_volume = 50

s1_hour = 11
s1_minute = 0
s1_folder = Trip Hop
s1_max_volume = 80

s2_hour = 18
s2_minute = 30
s2_folder = Rock
s2_max_volume = 80

Project resources

Changelog

0.2.0

  • Display time of current playing track - #9

  • Play album from new section when its time is reached - #8

  • Added skip to next album - #5

  • History is stored per section - #6

0.1.0

  • Initial release.

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

Mopidy-Auto-0.2.0.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

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

Mopidy_Auto-0.2.0-py2.py3-none-any.whl (36.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file Mopidy-Auto-0.2.0.tar.gz.

File metadata

  • Download URL: Mopidy-Auto-0.2.0.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Mopidy-Auto-0.2.0.tar.gz
Algorithm Hash digest
SHA256 82ad0f11ad3a0cf821fed076e0a2a988762d6813ba17174ab21834f9caec3173
MD5 d3a013a5d045d41f70a8781ae0e23437
BLAKE2b-256 bb267c6219e4107dd385357e290aa3892cc6f8edfb825abd49758360a160400c

See more details on using hashes here.

File details

Details for the file Mopidy_Auto-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Mopidy_Auto-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6ed1d4c2e76d5fcef3afbf77d45fecb5d336b8b33da3bdfaf83f4cb29f781cb2
MD5 323d6bdfeda7a0c36abe0f39fa248d73
BLAKE2b-256 143c17ffd019942ac80b4c2a2157d3cef926c5d5e7828e9783575674e980f422

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