Fix parsing chapter marks containing a decimal point

This commit is contained in:
Bart De Vries 2021-10-25 11:50:40 +02:00
parent 3d5a00d2d7
commit 710f44d2ef
1 changed files with 3 additions and 1 deletions

View File

@ -283,8 +283,10 @@ bool UpdateFeedJob::processEntry(Syndication::ItemPtr entry)
}
int startInt = 0;
for (QString part : startParts) {
startInt = part.toInt() + startInt * 60;
// strip off decimal point if it's present
startInt = part.split(QStringLiteral("."))[0].toInt() + startInt * 60;
}
qCDebug(kastsFetcher) << "Found chapter mark:" << start << "; in seconds:" << startInt;
QString images = element.attribute(QStringLiteral("image"));
processChapter(entry->id(), startInt, title, entry->link(), images);
}