diff options
| author | Ben Winston | 2025-02-04 22:14:57 -0500 |
|---|---|---|
| committer | Ben Winston | 2025-02-04 22:14:57 -0500 |
| commit | 7b3d731b738cbf23c5e1f117baf954cdb5d81f10 (patch) | |
| tree | e1ea304bf3d4d84c17e6eab9532f1db457f1a128 | |
| parent | afe32dfe3c3294ff12a9c39d1294cd2db66b5ec8 (diff) | |
add 'genre'
| -rw-r--r-- | booki.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -32,6 +32,7 @@ static const DataField BOOK_FIELDS[] = { { "language", booki_string, true }, { "translator", booki_string, true }, { "on", booki_string, true }, + { "genre", booki_string, true }, { "id", booki_number, false }, { "_other", booki_raw, false } }; @@ -402,6 +403,7 @@ struct Book { ES language; ES translator; ES on; + ES genre; int published; // catch-all @@ -417,6 +419,7 @@ void init_book(BOOK* book) { book->language = default_es; book->translator = default_es; book->on = default_es; + book->genre = default_es; book->published = 0; book->_other = default_es; @@ -437,6 +440,8 @@ ES* get_string_field(BOOK* book, char* name) { return &(book->translator); else if (ATTR_MATCH(name, "on")) return &(book->on); + else if (ATTR_MATCH(name, "genre")) + return &(book->genre); else if (ATTR_MATCH(name, "_other")) return &(book->_other); else |
