docs: itemkind behavior and filtering warning, also extend examples.
This commit is contained in:
parent
f39633d7c5
commit
af63a8a696
2 changed files with 27 additions and 2 deletions
|
@ -86,6 +86,14 @@ A lisp program to decide on a per item basis if it should be included in
|
||||||
the playlist, return `nil` to not include items, return any other value
|
the playlist, return `nil` to not include items, return any other value
|
||||||
to include them.
|
to include them.
|
||||||
|
|
||||||
|
**!!! The filter expression will include all items matching, if you do
|
||||||
|
not specify the kind of item to include/exclude all of them will be
|
||||||
|
added. Should you allow a playlist to be included all of it's items
|
||||||
|
will be added to the generated playlist !!!**
|
||||||
|
|
||||||
|
It's best to be explicit and always specify the item kinds you want to
|
||||||
|
include: `(and (or (is-type "MusicAlbum") (is-type "Audio")) . rest of filter)`.
|
||||||
|
|
||||||
The configuration page defines some useful functions to make it easier
|
The configuration page defines some useful functions to make it easier
|
||||||
to create filters. The above filter for liked items could be simplified
|
to create filters. The above filter for liked items could be simplified
|
||||||
to: `(is-favourite)`.
|
to: `(is-favourite)`.
|
||||||
|
|
21
examples.md
21
examples.md
|
@ -1,10 +1,27 @@
|
||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
* `Favourite Pop`: A Playlist
|
- `Favourite Pop`: A playlist
|
||||||
containing all favourite items of the genre pop.
|
containing all favourite items of the genre pop.
|
||||||
```
|
```
|
||||||
Id: Favourite Pop
|
Id: Favourite Pop
|
||||||
Name: Favourite Pop
|
Name: Favourite Pop
|
||||||
Program: |
|
Program: |
|
||||||
(and (is-favorite) (is-genre "pop" (genre-list)))
|
(and (is-type "Audio") (is-favorite) (is-genre "pop" (genre-list)))
|
||||||
|
```
|
||||||
|
- `Electro Swing`: A playlist containing all items
|
||||||
|
which have a genre that contains "electro" and a
|
||||||
|
genre that contains "swing". It will only include
|
||||||
|
albums and single tracks.
|
||||||
|
```
|
||||||
|
Id: Electro Swing
|
||||||
|
Name: Electro Swing
|
||||||
|
Program: |
|
||||||
|
(let
|
||||||
|
(g (genre-list))
|
||||||
|
(and
|
||||||
|
(or
|
||||||
|
(is-type "Audio")
|
||||||
|
(is-type "MusicAlbum"))
|
||||||
|
(is-genre "electro" g)
|
||||||
|
(is-genre "swing" g)))
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue