Add bpm keyword to smart playlists
This commit is contained in:
parent
5748b6502d
commit
84d1ee1cca
|
@ -21,6 +21,7 @@
|
|||
# Conductor (string)
|
||||
# Grouping (string) -- I don't even know what this is...
|
||||
# Year (int)
|
||||
# BPM (int)
|
||||
#
|
||||
# Valid operators include:
|
||||
# is, includes (string)
|
||||
|
|
|
@ -52,6 +52,7 @@ conductor { yylval.ival=CONDUCTOR; return(CONDUCTOR); }
|
|||
grouping { yylval.ival=GROUPING; return(GROUPING); }
|
||||
|
||||
year { yylval.ival=YEAR; return(YEAR); }
|
||||
bpm { yylval.ival=BPM; return(BPM); }
|
||||
|
||||
is { yylval.ival=IS; return(IS); }
|
||||
includes { yylval.ival=INCLUDES; return(INCLUDES); }
|
||||
|
|
|
@ -78,6 +78,7 @@ int pl_number=2;
|
|||
%token <ival> NUM
|
||||
|
||||
%token <ival> YEAR
|
||||
%token <ival> BPM
|
||||
|
||||
%type <plval> expression
|
||||
%type <plval> predicate
|
||||
|
@ -107,6 +108,7 @@ predicate: strtag strbool ID { $$=pl_newcharpredicate($1, $2, $3); }
|
|||
;
|
||||
|
||||
inttag: YEAR
|
||||
| BPM
|
||||
;
|
||||
|
||||
intbool: EQUALS { $$ = $1; }
|
||||
|
|
|
@ -116,6 +116,9 @@ void pl_dump_node(PL_NODE *pnode, int indent) {
|
|||
case YEAR:
|
||||
printf("YEAR ");
|
||||
break;
|
||||
case BPM:
|
||||
printf("BPM ");
|
||||
break;
|
||||
default:
|
||||
printf ("<unknown tag> ");
|
||||
break;
|
||||
|
@ -287,6 +290,9 @@ int pl_eval_node(MP3FILE *pmp3, PL_NODE *pnode) {
|
|||
case YEAR:
|
||||
ival=pmp3->year;
|
||||
break;
|
||||
case BPM:
|
||||
ival=pmp3->bpm;
|
||||
break;
|
||||
}
|
||||
|
||||
boolarg=(pnode->op) & 0x7FFFFFFF;
|
||||
|
|
Loading…
Reference in New Issue