mirror of
https://github.com/KDE/kasts.git
synced 2024-12-25 16:02:54 +01:00
Fix parsing chapter marks containing a decimal point
This commit is contained in:
parent
3d5a00d2d7
commit
710f44d2ef
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user