From 418a835857a96d4b948150a5f742091f981e0897 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Sat, 29 Oct 2022 20:26:04 -0400 Subject: [PATCH] handlers.c: added enclosure link to output --- handlers.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/handlers.c b/handlers.c index 6371480..5eb3eac 100644 --- a/handlers.c +++ b/handlers.c @@ -132,9 +132,14 @@ openFile(const char *folder, char *fileName, char *fileExt) static void outputHtml(itemStruct *item, FILE *f) { - fprintf(f, "

%s


\n", item->fields[FIELD_TITLE]); - fprintf(f, "Link
\n", item->fields[FIELD_LINK]); - fprintf(f, "%s", item->fields[FIELD_DESCRIPTION]); + if (item->fields[FIELD_TITLE]) + fprintf(f, "

%s


\n", item->fields[FIELD_TITLE]); + if (item->fields[FIELD_LINK]) + fprintf(f, "Link
\n", item->fields[FIELD_LINK]); + if (item->fields[FIELD_ENCLOSURE_URL]) + fprintf(f, "Enclosure
\n", item->fields[FIELD_ENCLOSURE_URL]); + if (item->fields[FIELD_DESCRIPTION]) + fprintf(f, "%s", item->fields[FIELD_DESCRIPTION]); } void