diff --git a/src/SMARTPL.g b/src/SMARTPL.g index 7e055aab..9275145c 100644 --- a/src/SMARTPL.g +++ b/src/SMARTPL.g @@ -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' diff --git a/src/SMARTPL2SQL.g b/src/SMARTPL2SQL.g index b6f66815..1a763364 100644 --- a/src/SMARTPL2SQL.g +++ b/src/SMARTPL2SQL.g @@ -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);