Commit f6b1aca6 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

make Discogs import work again

parent 935ce7b6
......@@ -70,18 +70,18 @@ void DiscogsDialog::parseFindResults(const QByteArray& searchStr)
// releases have the format:
// <li><a href="/release/761529"><span style="font-size: 11pt;"><em>Amon</em> <em>Amarth</em> - The <em>Avenger</em></span></a><br>
QString str = QString::fromUtf8(searchStr);
QRegExp idTitleRe("<a href=\"/release/([0-9]+)\">(.+)</a>");
QRegExp idTitleRe("<a href=\"/([^/]*/?release)/([0-9]+)\">(.+)</a>");
QStringList lines = QCM_split("<p/>", str.remove('\n').remove('\r'));
m_albumListBox->clear();
for (QStringList::const_iterator it = lines.begin(); it != lines.end(); ++it) {
if (idTitleRe.QCM_indexIn(*it) != -1) {
QString title(idTitleRe.cap(2));
QString title(idTitleRe.cap(3));
title.replace(QRegExp("<[^>]+>"), "");
new AlbumListItem(
m_albumListBox,
title,
"release",
idTitleRe.cap(1));
idTitleRe.cap(1),
idTitleRe.cap(2));
}
}
m_albumListBox->setFocus();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment