mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-07 12:53:00 -05:00
[docs] Clean up the docs
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
# OwnTone smart playlists
|
||||
|
||||
|
||||
To add a smart playlist to the server, create a new text file with a filename ending with .smartpl;
|
||||
To add a smart playlist to the server, create a new text file with a filename ending with .smartpl;
|
||||
the filename doesn't matter, only the .smartpl ending does. The file must be placed somewhere in your
|
||||
library folder.
|
||||
|
||||
|
||||
## Syntax
|
||||
|
||||
The contents of a smart playlist must follow the syntax:
|
||||
@@ -16,7 +14,6 @@ The contents of a smart playlist must follow the syntax:
|
||||
|
||||
There is exactly one smart playlist allowed for a .smartpl file.
|
||||
|
||||
|
||||
An expression consists of:
|
||||
|
||||
```
|
||||
@@ -82,10 +79,8 @@ Valid operands for the enumeration `media_kind` are:
|
||||
* `audiobook`
|
||||
* `tvshow`
|
||||
|
||||
|
||||
Multiple expressions can be anded or ored together, using the keywords `OR` and `AND`. The unary not operator is also supported using the keyword `NOT`.
|
||||
|
||||
|
||||
It is possible to define the sort order and limit the number of items by adding an order clause and/or a limit clause after the last expression:
|
||||
|
||||
```
|
||||
@@ -96,7 +91,6 @@ It is possible to define the sort order and limit the number of items by adding
|
||||
|
||||
There is additionally a special `random` _field-name_ that can be used in conjunction with `limit` to select a random number of items based on current expression.
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
@@ -144,6 +138,7 @@ This would match any podcast and audiobook file that was never played.
|
||||
limit 10
|
||||
}
|
||||
```
|
||||
|
||||
This would match the last 10 music files added to the library.
|
||||
|
||||
```
|
||||
@@ -155,6 +150,7 @@ This would match the last 10 music files added to the library.
|
||||
limit 10
|
||||
}
|
||||
```
|
||||
|
||||
This generates a random set of, maximum of 10, rated Pop music tracks every time the playlist is queried.
|
||||
|
||||
## Date operand syntax
|
||||
@@ -178,7 +174,6 @@ As an example, a valid date might be:
|
||||
|
||||
```3 weeks before today``` or ```3 weeks ago```
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
```
|
||||
@@ -202,7 +197,6 @@ All dates, except for `YYYY-DD-HH`, are relative to the day of when the server e
|
||||
|
||||
Note that `time_added after 4 weeks ago` and `time_added after last month` are subtly different; the former is exactly 4 weeks ago (from today) whereas the latter is the first day of the previous month.
|
||||
|
||||
|
||||
## Differences to mt-daapd smart playlists
|
||||
|
||||
The syntax is really close to the mt-daapd smart playlist syntax (see
|
||||
@@ -216,4 +210,3 @@ Some differences are:
|
||||
* the not operator must be placed before an expression and not before the operator
|
||||
* `||`, `&&`, `!` are not supported (use `or`, `and`, `not`)
|
||||
* comments are not supported
|
||||
|
||||
|
||||
Reference in New Issue
Block a user