From e8fdb0c5555b1a0279a8546485bcdc1b7972bf5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 23 Aug 2022 02:23:34 +0200 Subject: FetchData: Set bTVOriginal. I cheat a little and only compare the first two characters. --- c/data.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/c/data.cpp b/c/data.cpp index dd29ca8..149d9b6 100644 --- a/c/data.cpp +++ b/c/data.cpp @@ -116,12 +116,13 @@ void FetchData() xmlNextElementSibling(xmlNextElementSibling(nodeDate))); const xmlNodePtr nodeHint = xmlNextElementSibling(nodeSource); - WcharsFromXmlchars(e.siEp, xmlNodeGetContent(nodeEp)); - e.siEp[wcscspn(e.siEp, L"W")] = 0; /* Remove potential "WPS" suffix. */ - WcharsFromXmlchars(e.title, xmlNodeGetContent(nodeTitle)); WcharsFromXmlchars(d.date, xmlNodeGetContent(nodeDate)); WcharsFromXmlchars(d.source, xmlNodeGetContent(nodeSource)); WcharsFromXmlchars(d.hint, xmlNodeGetContent(nodeHint)); + e.bTVOriginal = wcsncmp(d.source, L"TV", 2) == 0? 1: 0; + WcharsFromXmlchars(e.siEp, xmlNodeGetContent(nodeEp)); + e.siEp[wcscspn(e.siEp, L"W")] = 0; /* Remove potential "WPS" suffix. */ + WcharsFromXmlchars(e.title, xmlNodeGetContent(nodeTitle)); /* Retrieve the link to the episode's wiki entry, * which should be the first (and only) child element -- cgit v1.2.3