diff --git a/inc/import/parser/class.ParserFITLOGSingle.php b/inc/import/parser/class.ParserFITLOGSingle.php index e88736606d..fa0a493219 100644 --- a/inc/import/parser/class.ParserFITLOGSingle.php +++ b/inc/import/parser/class.ParserFITLOGSingle.php @@ -47,7 +47,11 @@ protected function throwNoFITLOGError() { */ protected function parseGeneralValues() { $this->TrainingObject->setTimestamp( strtotime((string)$this->XML['StartTime']) ); - $this->TrainingObject->setSportid( Configuration::General()->mainSport() ); + + if (!empty($this->XML['categoryName'])) + $this->guessSportID( (string)$this->XML['categoryName'] ); + else + $this->TrainingObject->setSportid( Configuration::General()->mainSport() ); if (!empty($this->XML->Duration['TotalSeconds'])) $this->TrainingObject->setTimeInSeconds(round((double)$this->XML->Duration['TotalSeconds']));