Незначительные исправления для "симметрии" источников.
authorRoman Bazalevskiy <rvb@rvb.name>
Sun, 27 May 2018 10:44:44 +0000 (13:44 +0300)
committerRoman Bazalevskiy <rvb@rvb.name>
Sun, 27 May 2018 10:44:44 +0000 (13:44 +0300)
pyrungps.py

index 0f0dc563206b28a58116df86a2b1c2ab3342a2ae..f6ad327a96b48dd250f812290dc684cf7d9ad3b0 100644 (file)
@@ -277,6 +277,13 @@ def sync_folder(username,year,month,dir=".",verbose=False,force=False):
         gpx = pygpx.GPX()
         gpx.ReadTree(xml)
 
+        sport = training['sport']
+        timestamp = gpx.tracks[0].start_time()
+        
+        if check_db_for_training(db,sport,timestamp):
+          print "The same training found"
+          continue
+
         gpx.FixNames(tr[0])
         gpx.ProcessTrackSegs()