[scan] Add support for "empty" operand in smart playlists

"empty" will be parsed to SQL NULL
This commit is contained in:
Drew Thompson
2025-08-25 12:14:31 -05:00
committed by GitHub
parent 753a027ce1
commit d8485bf3c2
3 changed files with 29 additions and 0 deletions

View File

@@ -63,6 +63,9 @@ Valid operands include:
* "string value" (string)
* integer (int)
* `empty`
The `empty` operand is only valid with the `is` operator and matches items with no value for the given field-name e.g. `comment`
Valid operands for the enumeration `data_kind` are:
@@ -155,6 +158,17 @@ This would match the last 10 music files added to the library.
This generates a random set of, maximum of 10, rated Pop music tracks every time the playlist is queried.
```
"All Jazz, No Foo" {
media_kind is music and
genre is "jazz" and
(not comment includes "foo" or
comment is empty)
}
```
This matches both the songs with comments that do not include "foo", but also the songs with no comment.
## Date Operand Syntax
One example of a valid date is a date in yyyy-mm-dd format: