aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-23 02:23:34 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-23 02:23:34 +0200
commite8fdb0c5555b1a0279a8546485bcdc1b7972bf5b (patch)
treeabe9483f4439cb6532ec5a09d0167f8dacf7da43
parente2eaf362ba1b48b1518e1193ca2ae2a8e6e65efa (diff)
downloadEpisodeBrowser-e8fdb0c5555b1a0279a8546485bcdc1b7972bf5b.tar.gz
FetchData: Set bTVOriginal.
I cheat a little and only compare the first two characters.
-rw-r--r--c/data.cpp7
1 files 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