DB config

This commit is contained in:
Manuel Weiser 2024-05-11 08:28:37 +02:00
parent 12c0dec445
commit 14486c2e1c

View File

@ -25,7 +25,7 @@ def main():
(_, type_names, fpath, filename) = event
if event != None:
print("PATH=[{}] FILENAME=[{}] EVENT_TYPES={}".format(path, filename, type_names))
#print("PATH=[{}] FILENAME=[{}] EVENT_TYPES={}".format(path, filename, type_names))
if type_names[0] == "IN_MOVED_TO":
if filename.endswith(ext):
processFIT(filename)
@ -56,7 +56,8 @@ def doAll(file):
fitData["avg_speed"] = record.get_value("avg_speed")
#fitData["total_ascent"] = float(record.get_value("total_ascent")) if record.get_value("total_ascent") != None else 0
fitData["total_distance"] = round(record.get_value("total_distance") / 1000, 1)
fitData["date"] = record.get_value("start_time").strftime("%d.%m.%Y")
#fitData["date"] = record.get_value("start_time").strftime("%d.%m.%Y")
fitData["date"] = record.get_value("start_time")
fitData["total_calories"] = record.get_value("total_calories")
if record.get_value("max_altitude"):
fitData["max_altitude"] = round(float(record.get_value("max_altitude")), 1)