mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
Merge pull request #994 from whatdoineed2do/smartpl-support-random
[SMARTPL] add 'random' in 'order by' clause
This commit is contained in:
commit
077a642930
@ -37,6 +37,7 @@ ordertag : STRTAG
|
||||
| INTTAG
|
||||
| DATETAG
|
||||
| ENUMTAG
|
||||
| RANDOMTAG
|
||||
| (XXX)? NeverUsedRule
|
||||
;
|
||||
|
||||
@ -117,6 +118,9 @@ GROUPTAG : 'track_count'
|
||||
| 'album_count'
|
||||
;
|
||||
|
||||
RANDOMTAG : 'random'
|
||||
;
|
||||
|
||||
INCLUDES : 'includes'
|
||||
;
|
||||
|
||||
|
@ -345,6 +345,11 @@ ordertag returns [ pANTLR3_STRING result ]
|
||||
$result->append8($result, "f.");
|
||||
$result->appendS($result, $ENUMTAG.text->toUTF8($ENUMTAG.text));
|
||||
}
|
||||
| RANDOMTAG
|
||||
{
|
||||
$result = $RANDOMTAG.text->factory->newRaw($RANDOMTAG.text->factory);
|
||||
$result->append8($result, "random()");
|
||||
}
|
||||
;
|
||||
|
||||
dateval returns [ pANTLR3_STRING result ]
|
||||
|
Loading…
Reference in New Issue
Block a user