aboutsummaryrefslogtreecommitdiff
path: root/c/data.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/data.cpp')
-rw-r--r--c/data.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/c/data.cpp b/c/data.cpp
index b1c028e..62d544a 100644
--- a/c/data.cpp
+++ b/c/data.cpp
@@ -125,7 +125,7 @@ void WaitFor(Window& window, void (*f)(unsigned char*))
sig |= DONE;
} catch (...) {
sig |= DONE;
- ShowException(L"Remote data could not be fetched due to an error: %s",
+ ShowException(L"Remote data could not be fetched due to an error while %s: %s",
L"Error", MB_ICONWARNING);
}
};
@@ -155,6 +155,8 @@ void WaitFor(Window& window, void (*f)(unsigned char*))
void FetchData(unsigned char* sig)
{
+ Act(L"fetching and parsing general episode data");
+
/* The remote data is retrieved using WinINet from the
* Detective Conan World wiki. Using libxml2's "push parser",
* the HTML is parsed piece by piece as it is retrieved. The
@@ -181,6 +183,8 @@ void FetchData(unsigned char* sig)
if (!nodes || !nodes->nodeNr)
throw std::runtime_error("could not find remote episode information");
+ Act(L"inserting remote data");
+
for (int i = 0; i < nodes->nodeNr; i++) {
if (*sig & ABORT)
return;
@@ -222,6 +226,8 @@ void FetchData(unsigned char* sig)
void FetchScreenwriters(unsigned char* sig)
{
+ Act(L"fetching and parsing screenwriter data");
+
/* Screenwriters are expensive to fetch, so we try to avoid
* fetching screenwriters for episodes that already have a
* screenwriter. Additionally, in the same session, we don't
@@ -262,7 +268,6 @@ void FetchScreenwriters(unsigned char* sig)
Wcscpy(Buf(url)+Len(prefix), d.wiki);
/* Retrieve screenwriter from HTML. */
-
UniqueOk<htmlParserCtxtPtr, xmlFreeParserCtxt> ctx = RemoteParserCtxt(url, nullptr);
xpathCtx = xmlXPathNewContext(ctx.v->myDoc);
if (xpathCtx.Bad(0))