mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-15 16:53:18 -05:00
[smartpl] Add "scan_kind" field to smart query language
This commit is contained in:
parent
1d2e4dc7a8
commit
1694e6e111
@ -114,6 +114,7 @@ DATETAG : 'time_added'
|
||||
|
||||
ENUMTAG : 'data_kind'
|
||||
| 'media_kind'
|
||||
| 'scan_kind'
|
||||
;
|
||||
|
||||
GROUPTAG : 'track_count'
|
||||
@ -205,6 +206,8 @@ ENUMVAL : 'music'
|
||||
| 'url'
|
||||
| 'spotify'
|
||||
| 'pipe'
|
||||
| 'files'
|
||||
| 'rss'
|
||||
;
|
||||
|
||||
ORDERBY : 'order by'
|
||||
|
@ -304,6 +304,21 @@ expression returns [ pANTLR3_STRING result, pANTLR3_STRING orderby, pANTLR3_STRI
|
||||
sprintf(str, "f.data_kind = \%d", DATA_KIND_PIPE);
|
||||
}
|
||||
}
|
||||
else if (strcmp((char *)tag, "scan_kind") == 0)
|
||||
{
|
||||
if (strcmp((char *)val, "files") == 0)
|
||||
{
|
||||
sprintf(str, "f.scan_kind = \%d", SCAN_KIND_FILES);
|
||||
}
|
||||
else if (strcmp((char *)val, "spotify") == 0)
|
||||
{
|
||||
sprintf(str, "f.scan_kind = \%d", SCAN_KIND_SPOTIFY);
|
||||
}
|
||||
else if (strcmp((char *)val, "rss") == 0)
|
||||
{
|
||||
sprintf(str, "f.scan_kind = \%d", SCAN_KIND_RSS);
|
||||
}
|
||||
}
|
||||
|
||||
$result = $ENUMTAG.text->factory->newRaw($ENUMTAG.text->factory);
|
||||
$result->append8($result, str);
|
||||
|
Loading…
x
Reference in New Issue
Block a user