doc: explain audiogenerators/audiospec some more
This commit is contained in:
parent
3a59fdd917
commit
0f565910f7
2 changed files with 10 additions and 3 deletions
|
@ -40,6 +40,10 @@ action
|
||||||
For example, ``{ 'kind': 'randomdir', 'paths': ['/my/dir', '/other/path'] }``
|
For example, ``{ 'kind': 'randomdir', 'paths': ['/my/dir', '/other/path'] }``
|
||||||
will pick a random file from one of the two paths.
|
will pick a random file from one of the two paths.
|
||||||
|
|
||||||
|
Its main atribute is ``kind``. The kind essentialy specifies the function that will be run among a
|
||||||
|
predefined set of :doc:`audiogenerators` . Every other attribute is an argument to the specified
|
||||||
|
audiogenerator.
|
||||||
|
|
||||||
event
|
event
|
||||||
An event is an alarm plus a list of actions. At given times, do those things
|
An event is an alarm plus a list of actions. At given times, do those things
|
||||||
|
|
||||||
|
|
|
@ -85,9 +85,12 @@ Events
|
||||||
CONTINOUS_AUDIOSPEC
|
CONTINOUS_AUDIOSPEC
|
||||||
when the playlist is too short, larigira picks something new. How? this is controlled by this variable.
|
when the playlist is too short, larigira picks something new. How? this is controlled by this variable.
|
||||||
This variable should be set to the JSON representation of an audiospec describing how to generate new
|
This variable should be set to the JSON representation of an audiospec describing how to generate new
|
||||||
audios. The default is ``{"kind": "mpd", "howmany": 1}``. You could, for example, change it to
|
audios. The default is ``{"kind": "mpd", "howmany": 1}``, which picks a random song from MPD library. You could, for example, change it to:
|
||||||
``{ "kind": "randomdir", "paths": ["/var/music"], "howmany": 10}``
|
|
||||||
or to ``{"kind": "mpd", "howmany": 5, "prefix": "background"}``.
|
- ``{ "kind": "randomdir", "paths": ["/var/music"], "howmany": 5}`` to pick files from a specified
|
||||||
|
directory, ignoring MPD library completely. Here, ``howmany`` is set to 5 for performance sake
|
||||||
|
- ``{"kind": "mpd", "howmany": 10, "prefix": "background"}`` if you want to use the MPD library, but only
|
||||||
|
use one of its subdirectories. Please note that using ``mpd`` with a ``prefix`` can be slow, so this is setting ``howmany`` to 10 to gain some performance
|
||||||
|
|
||||||
Yes, there's a typo in the name, but I'll keep it like this for compatibility
|
Yes, there's a typo in the name, but I'll keep it like this for compatibility
|
||||||
EVENT_FILTERS
|
EVENT_FILTERS
|
||||||
|
|
Loading…
Reference in a new issue