parent
6d164e019b
commit
ca595c985c
@ -276,8 +276,15 @@ bool UpdateFeedJob::processEntry(Syndication::ItemPtr entry)
|
|||||||
QDomElement element = nodelist.at(i).toElement();
|
QDomElement element = nodelist.at(i).toElement();
|
||||||
QString title = element.attribute(QStringLiteral("title"));
|
QString title = element.attribute(QStringLiteral("title"));
|
||||||
QString start = element.attribute(QStringLiteral("start"));
|
QString start = element.attribute(QStringLiteral("start"));
|
||||||
QTime startString = QTime::fromString(start, QStringLiteral("hh:mm:ss.zzz"));
|
QStringList startParts = start.split(QStringLiteral(":"));
|
||||||
int startInt = startString.hour() * 60 * 60 + startString.minute() * 60 + startString.second();
|
// Some podcasts use colon for milliseconds as well
|
||||||
|
while (startParts.count() > 3) {
|
||||||
|
startParts.removeLast();
|
||||||
|
}
|
||||||
|
int startInt = 0;
|
||||||
|
for (QString part : startParts) {
|
||||||
|
startInt = part.toInt() + startInt * 60;
|
||||||
|
}
|
||||||
QString images = element.attribute(QStringLiteral("image"));
|
QString images = element.attribute(QStringLiteral("image"));
|
||||||
processChapter(entry->id(), startInt, title, entry->link(), images);
|
processChapter(entry->id(), startInt, title, entry->link(), images);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user