From 7b3d731b738cbf23c5e1f117baf954cdb5d81f10 Mon Sep 17 00:00:00 2001 From: Ben Winston Date: Tue, 4 Feb 2025 22:14:57 -0500 Subject: add 'genre' --- booki.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/booki.c b/booki.c index 8f9af6d..3edbd8f 100644 --- a/booki.c +++ b/booki.c @@ -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 -- cgit v1.2.3