Import Name element from fitlog files

Also fixes a (likely) typo when downloading from sporttracks.mobi
Fixes #4212
This commit is contained in:
Alejandro Martinez
2022-04-20 19:33:38 -03:00
parent 98c22dc185
commit be1af0f6d6
2 changed files with 5 additions and 1 deletions

View File

@@ -338,7 +338,7 @@ SportTracks::readFileCompleted()
}
// location => route
if (!ride["name"].isNull()) ret->setTag("Objectives", ride["name"].toString());
if (!ride["name"].isNull()) ret->setTag("Objective", ride["name"].toString());
if (!ride["notes"].isNull()) ret->setTag("Notes", ride["notes"].toString());
if (!ride["location_name"].isNull()) ret->setTag("Route", ride["location_name"].toString());

View File

@@ -227,6 +227,10 @@ FitlogParser::endElement( const QString&, const QString&, const QString& qName)
}
rideFile->setRecIntSecs(populardelta);
} else if (qName == "Name") {
rideFile->setTag("Objective", buffer);
} else if (qName == "Notes") {
rideFile->setTag("Notes", buffer);