Fixed spoiler list parsing, oracle works again.
This commit is contained in:
parent
b179f446f5
commit
8bd247e681
1 changed files with 2 additions and 1 deletions
|
@ -193,7 +193,7 @@ int OracleImporter::importTextSpoiler(CardSet *set, const QByteArray &data)
|
||||||
QString v1 = tds.at(0).toElement().text().simplified();
|
QString v1 = tds.at(0).toElement().text().simplified();
|
||||||
QString v2 = tds.at(1).toElement().text().replace(trUtf8("—"), "-");
|
QString v2 = tds.at(1).toElement().text().replace(trUtf8("—"), "-");
|
||||||
|
|
||||||
if (v1 == "Name:") {
|
if (v1 == "Name") {
|
||||||
QDomElement a = tds.at(1).toElement().elementsByTagName("a").at(0).toElement();
|
QDomElement a = tds.at(1).toElement().elementsByTagName("a").at(0).toElement();
|
||||||
QString href = a.attributes().namedItem("href").nodeValue();
|
QString href = a.attributes().namedItem("href").nodeValue();
|
||||||
cardId = href.mid(href.indexOf("multiverseid=") + 13).toInt();
|
cardId = href.mid(href.indexOf("multiverseid=") + 13).toInt();
|
||||||
|
@ -258,6 +258,7 @@ void OracleImporter::downloadNextFile()
|
||||||
if (urlString.isEmpty())
|
if (urlString.isEmpty())
|
||||||
urlString = setUrl;
|
urlString = setUrl;
|
||||||
urlString = urlString.replace("!longname!", setsToDownload[setIndex].getLongName());
|
urlString = urlString.replace("!longname!", setsToDownload[setIndex].getLongName());
|
||||||
|
|
||||||
if (urlString.startsWith("http://")) {
|
if (urlString.startsWith("http://")) {
|
||||||
QUrl url(urlString);
|
QUrl url(urlString);
|
||||||
http->setHost(url.host(), QHttp::ConnectionModeHttp, url.port() == -1 ? 0 : url.port());
|
http->setHost(url.host(), QHttp::ConnectionModeHttp, url.port() == -1 ? 0 : url.port());
|
||||||
|
|
Loading…
Reference in a new issue