From be1af0f6d640b38c66df8bb707d6ebc1e4edb7d2 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Date: Wed, 20 Apr 2022 19:33:38 -0300 Subject: [PATCH] Import Name element from fitlog files Also fixes a (likely) typo when downloading from sporttracks.mobi Fixes #4212 --- src/Cloud/SportTracks.cpp | 2 +- src/FileIO/FitlogParser.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Cloud/SportTracks.cpp b/src/Cloud/SportTracks.cpp index bbacf3451..d7a4e80a9 100644 --- a/src/Cloud/SportTracks.cpp +++ b/src/Cloud/SportTracks.cpp @@ -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()); diff --git a/src/FileIO/FitlogParser.cpp b/src/FileIO/FitlogParser.cpp index c00c2a691..e57242a77 100644 --- a/src/FileIO/FitlogParser.cpp +++ b/src/FileIO/FitlogParser.cpp @@ -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);