diff --git a/contrib/mt-daapd.playlist b/contrib/mt-daapd.playlist index ab38ead1..a95030fe 100644 --- a/contrib/mt-daapd.playlist +++ b/contrib/mt-daapd.playlist @@ -21,6 +21,7 @@ # Conductor (string) # Grouping (string) -- I don't even know what this is... # Comment (string) +# Type (string) -- "mp3 audio file", "m4a audio file", etc. # Year (int) # BPM (int) # Bitrate (int) diff --git a/src/lexer.l b/src/lexer.l index f75635d0..fda3f9a3 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -55,6 +55,7 @@ orchestra { yylval.ival=ORCHESTRA; return(ORCHESTRA); } conductor { yylval.ival=CONDUCTOR; return(CONDUCTOR); } grouping { yylval.ival=GROUPING; return(GROUPING); } type { yylval.ival=TYPE; return(TYPE); } +comment { yylval.ival=COMMENT; return(COMMENT); } year { yylval.ival=YEAR; return(YEAR); } bpm { yylval.ival=BPM; return(BPM); } diff --git a/src/parser.y b/src/parser.y index 63918722..92211f37 100644 --- a/src/parser.y +++ b/src/parser.y @@ -63,6 +63,7 @@ int pl_number=2; %token CONDUCTOR %token GROUPING %token TYPE +%token COMMENT %token EQUALS %token LESS @@ -162,6 +163,7 @@ strtag: ARTIST | CONDUCTOR | GROUPING | TYPE +| COMMENT ; strbool: IS { $$=$1; } diff --git a/src/playlist.c b/src/playlist.c index 93068611..15f86efb 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -119,6 +119,9 @@ void pl_dump_node(PL_NODE *pnode, int indent) { case TYPE: printf("TYPE "); break; + case COMMENT: + printf("COMMENT "); + break; case YEAR: printf("YEAR "); break; @@ -313,6 +316,9 @@ int pl_eval_node(MP3FILE *pmp3, PL_NODE *pnode) { case TYPE: cval=pmp3->description; break; + case COMMENT: + cval=pmp3->comment; + break; case YEAR: ival=pmp3->year; break;