add template + medium to metadata
This commit is contained in:
parent
f1e39e0513
commit
6fe3ed8dad
|
@ -24,6 +24,10 @@ typedef struct {
|
|||
|
||||
char** annotators;
|
||||
size_t annotator_count;
|
||||
|
||||
char* template;
|
||||
char* medium;
|
||||
|
||||
} HMML_VideoMetaData;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "stb_sb.h"
|
||||
#include "hmmlib.h"
|
||||
|
||||
const struct HMML_Version hmml_version = { 0, 1, 0 };
|
||||
const struct HMML_Version hmml_version = { 0, 2, 0 };
|
||||
|
||||
typedef struct {
|
||||
int line;
|
||||
|
@ -119,6 +119,8 @@ RB \]
|
|||
<VIDEO>title{S}= { yyextra->attr = V_(title); BEGIN(V_ATTR); }
|
||||
<VIDEO>vod_platform{S}= { yyextra->attr = V_(vod_platform); BEGIN(V_ATTR); }
|
||||
<VIDEO>id{S}= { yyextra->attr = V_(id); BEGIN(V_ATTR); }
|
||||
<VIDEO>template{S}= { yyextra->attr = V_(template); BEGIN(V_ATTR); }
|
||||
<VIDEO>medium{S}= { yyextra->attr = V_(medium); BEGIN(V_ATTR); }
|
||||
<VIDEO>co\-host{S}= { yyextra->attr = V_(co_hosts); BEGIN(V2_ATTR); }
|
||||
<VIDEO>guest{S}= { yyextra->attr = V_(guests); BEGIN(V2_ATTR); }
|
||||
<VIDEO>annotator{S}= { yyextra->attr = V_(annotators); BEGIN(V2_ATTR); }
|
||||
|
@ -320,6 +322,8 @@ void hmml_free(HMML_Output* hmml){
|
|||
free(hmml->metadata.title);
|
||||
free(hmml->metadata.vod_platform);
|
||||
free(hmml->metadata.id);
|
||||
free(hmml->metadata.template);
|
||||
free(hmml->metadata.medium);
|
||||
|
||||
sb_each(i, hmml->metadata.co_hosts) free(*i);
|
||||
sb_each(i, hmml->metadata.guests) free(*i);
|
||||
|
@ -350,7 +354,7 @@ Index* index_find(Index* base, const char* text){
|
|||
void hmml_dump(HMML_Output* hmml){
|
||||
|
||||
if(!hmml){
|
||||
puts("(null");
|
||||
puts("(null)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue