Fix unhandled exception when getting book details with incorrect ASIN.
MODIFY
dist/BaseDB.sql
dist/BaseDB.sql
CREATE TABLE type(id INTEGER, label INTEGER, singular_label INTEGER, icon INTEGER, top_mentioned_entities TEXT, PRIMARY KEY(id));
-INSERT INTO `type` VALUES ('1','7','8','1', '');
-INSERT INTO `type` VALUES ('2','9','10','2', '');
+INSERT INTO `type` VALUES ('1','9','10','1', '');
+INSERT INTO `type` VALUES ('2','11','12','2', '');
CREATE TABLE string(id INTEGER, language TEXT, text TEXT);
INSERT INTO `string` VALUES ('0','de','Alle');
INSERT INTO `string` VALUES ('0','en','All');

MODIFY
src/DataSources/Goodreads.cs
src/DataSources/Goodreads.cs
@@ -519,7 +519,8 @@ private XRay.Term GetTerm(string baseUrl, string relativeUrl)
result.DescUrl = tempUri.ToString();
HtmlDocument charDoc = new HtmlDocument();
charDoc.LoadHtml(HttpDownloader.GetPageHtml(tempUri.ToString()));
- HtmlNode mainNode = charDoc.DocumentNode.SelectSingleNode("//div[@class='mainContentFloat']");
+ HtmlNode mainNode = charDoc.DocumentNode.SelectSingleNode("//div[@class='mainContentFloat']")
+ ?? charDoc.DocumentNode.SelectSingleNode("//div[@class='mainContentFloat ']");
result.TermName = mainNode.SelectSingleNode("./h1").InnerText;
mainNode = mainNode.SelectSingleNode("//div[@class='grey500BoxContent']");
HtmlNodeCollection tempNodes = mainNode.SelectNodes("//div[@class='floatingBox']");

MODIFY
src/frmMain.cs
src/frmMain.cs
@@ -794,7 +794,14 @@ private void txtMobi_TextChanged(object sender, EventArgs e)
}
catch (Exception ex)
{
- Log("An error occurred metadata: " + ex.Message + "\r\n" + ex.StackTrace);
+ Log("An error occurred metadata: " + ex.Message);
+ return;
+ }
+
+ if (results.Count != 7)
+ {
+ this.Cursor = Cursors.Default;
+ txtMobi.Text = "";
return;
}

Fix unhandled exception when getting book details with incorrect ASIN.