diff options
author | John Ankarström <john@ankarstrom.se> | 2022-08-23 02:23:34 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-08-23 02:23:34 +0200 |
commit | e8fdb0c5555b1a0279a8546485bcdc1b7972bf5b (patch) | |
tree | abe9483f4439cb6532ec5a09d0167f8dacf7da43 | |
parent | e2eaf362ba1b48b1518e1193ca2ae2a8e6e65efa (diff) | |
download | EpisodeBrowser-e8fdb0c5555b1a0279a8546485bcdc1b7972bf5b.tar.gz |
FetchData: Set bTVOriginal.
I cheat a little and only compare the first two characters.
-rw-r--r-- | c/data.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |