upload strava zip
This commit is contained in:
@@ -201,6 +201,10 @@ def strava_to_parsed(meta: dict, streams: dict) -> ParsedActivity:
|
||||
source = f"strava:{meta['id']}"
|
||||
source_hash = "sha256:" + hashlib.sha256(source.encode()).hexdigest()
|
||||
|
||||
# Map Strava visibility to BAS privacy: only_me → private, everything else → public
|
||||
visibility = meta.get("visibility") or ""
|
||||
is_private = meta.get("private", False) or visibility == "only_me"
|
||||
|
||||
return ParsedActivity(
|
||||
points=points,
|
||||
sport=normalise_sport(meta.get("sport_type") or meta.get("type") or ""),
|
||||
@@ -210,4 +214,5 @@ def strava_to_parsed(meta: dict, streams: dict) -> ParsedActivity:
|
||||
title=meta.get("name") or None,
|
||||
description=meta.get("description") or None,
|
||||
strava_id=str(meta["id"]),
|
||||
privacy="private" if is_private else "public",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user