From 2b0bf108b8b625b1f6f9992ac7eb934321e6bbf3 Mon Sep 17 00:00:00 2001 From: oldnapalm <38410858+oldnapalm@users.noreply.github.com> Date: Fri, 21 Jun 2024 15:31:05 -0300 Subject: [PATCH] Update InvitedProfileProto Update invite world attribute (fixes #337) --- protobuf/events.proto | 7 ++++ protobuf/events_pb2.py | 78 ++++++++++++++++++++++-------------------- zwift_offline.py | 15 ++++---- 3 files changed, 53 insertions(+), 47 deletions(-) diff --git a/protobuf/events.proto b/protobuf/events.proto index 746957fd..31ed53d9 100644 --- a/protobuf/events.proto +++ b/protobuf/events.proto @@ -9,6 +9,7 @@ message InvitedProfileProto { optional bool enrolledZwiftAcademy = 5; optional bool male = 6; optional PlayerType player_type = 7; + optional EventCategory event_category = 8; } enum EventInviteStatus { @@ -160,6 +161,12 @@ enum EventCulling { CULLING_EVENT_ONLY = 2; CULLING_SUBGROUP_ONLY = 3; } +enum EventCategory { + EC_FEMALE = 0; + EC_MALE = 1; + EC_BINARY = 2; +} + message Event { //real name: EventProtobuf; where is shortName, shortDescription, rulesSet, routeUrl, bikeHash, //privateEvent, followeeEntrantCount, totalEntrantCount, followeeSignedUpCount, totalSignedUpCount, followeeJoinedCount, //totalJoinedCount, auxiliaryUrl, imageS3Name, imageS3Bucket, cullingType, recurring, recurringOffset, publishRecurring, parentId, type, workoutHash, diff --git a/protobuf/events_pb2.py b/protobuf/events_pb2.py index ddc5807a..710dadfe 100644 --- a/protobuf/events_pb2.py +++ b/protobuf/events_pb2.py @@ -14,49 +14,51 @@ import profile_pb2 as profile__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x65vents.proto\x1a\rprofile.proto\"\xad\x01\n\x13InvitedProfileProto\x12\x11\n\tplayer_id\x18\x01 \x02(\x04\x12\x11\n\tfirstName\x18\x02 \x01(\t\x12\x10\n\x08lastName\x18\x03 \x01(\t\x12\x10\n\x08imageSrc\x18\x04 \x01(\t\x12\x1c\n\x14\x65nrolledZwiftAcademy\x18\x05 \x01(\x08\x12\x0c\n\x04male\x18\x06 \x01(\x08\x12 \n\x0bplayer_type\x18\x07 \x01(\x0e\x32\x0b.PlayerType\"]\n\x10\x45ventInviteProto\x12%\n\x07profile\x18\x01 \x01(\x0b\x32\x14.InvitedProfileProto\x12\"\n\x06status\x18\x02 \x02(\x0e\x32\x12.EventInviteStatus\"\xcb\x03\n\x15PrivateEventFeedProto\x12\x10\n\x08\x65vent_id\x18\x01 \x02(\x04\x12\x15\n\x05sport\x18\x02 \x01(\x0e\x32\x06.Sport\x12\x1a\n\x12\x65ventSubgroupStart\x18\x03 \x01(\x04\x12\x10\n\x08route_id\x18\x04 \x01(\x04\x12\x19\n\x11\x64urationInSeconds\x18\x05 \x01(\r\x12\x18\n\x10\x64istanceInMeters\x18\x06 \x01(\x02\x12\x15\n\ransweredCount\x18\x07 \x01(\x04\x12\x19\n\x11invitedTotalCount\x18\x08 \x01(\r\x12\x1d\n\x15\x61\x63\x63\x65ptedFolloweeCount\x18\t \x01(\r\x12\x1a\n\x12\x61\x63\x63\x65ptedTotalCount\x18\n \x01(\r\x12\x19\n\x11organizerImageUrl\x18\x0b \x01(\t\x12\x1a\n\x12organizerProfileId\x18\x0c \x01(\x04\x12\x1a\n\x12organizerFirstName\x18\r \x01(\t\x12\x19\n\x11organizerLastName\x18\x0e \x01(\t\x12\x12\n\nupdateDate\x18\x0f \x01(\x04\x12\x12\n\nsubgroupId\x18\x10 \x01(\x04\x12\x0c\n\x04laps\x18\x11 \x01(\r\x12\x15\n\rrubberbanding\x18\x12 \x01(\x08\"@\n\x19PrivateEventFeedListProto\x12#\n\x03pef\x18\x01 \x03(\x0b\x32\x16.PrivateEventFeedProto\"F\n\x11PlayerJoinedEvent\x12\x0e\n\x06rel_id\x18\x01 \x02(\x04\x12\x11\n\tplayer_id\x18\x02 \x01(\x04\x12\x0e\n\x06pje_f3\x18\x03 \x01(\x04\"D\n\x0fPlayerLeftEvent\x12\x0e\n\x06rel_id\x18\x01 \x02(\x04\x12\x11\n\tplayer_id\x18\x02 \x01(\x04\x12\x0e\n\x06ple_f3\x18\x03 \x01(\x04\"\xd3\x07\n\x15\x45ventSubgroupProtobuf\x12\n\n\x02id\x18\x01 \x02(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0e\n\x06\x65vs_f4\x18\x04 \x01(\r\x12\x0e\n\x06\x65vs_f5\x18\x05 \x01(\r\x12\x0e\n\x06\x65vs_f6\x18\x06 \x01(\r\x12\r\n\x05scode\x18\x07 \x01(\t\x12\x10\n\x08rules_id\x18\x08 \x01(\x04\x12\x19\n\x11registrationStart\x18\t \x01(\x04\x12\x1b\n\x13registrationStartWT\x18\n \x01(\x04\x12\x17\n\x0fregistrationEnd\x18\x0b \x01(\x04\x12\x19\n\x11registrationEndWT\x18\x0c \x01(\x04\x12\x13\n\x0blineUpStart\x18\r \x01(\x04\x12\x15\n\rlineUpStartWT\x18\x0e \x01(\x04\x12\x11\n\tlineUpEnd\x18\x0f \x01(\x04\x12\x13\n\x0blineUpEndWT\x18\x10 \x01(\x04\x12\x1a\n\x12\x65ventSubgroupStart\x18\x11 \x01(\x04\x12\x1c\n\x14\x65ventSubgroupStartWT\x18\x12 \x01(\x04\x12\x0f\n\x07\x65vs_f19\x18\x13 \x01(\x04\x12\x0f\n\x07\x65vs_f20\x18\x14 \x01(\x04\x12\x0f\n\x07\x65vs_f21\x18\x15 \x01(\x08\x12\x10\n\x08route_id\x18\x16 \x02(\x04\x12\x16\n\x0einvitedLeaders\x18\x17 \x03(\x04\x12\x18\n\x10\x64istanceInMeters\x18\x18 \x01(\x02\x12\x0c\n\x04laps\x18\x19 \x01(\r\x12\x15\n\rstartLocation\x18\x1d \x01(\x04\x12\r\n\x05label\x18\x1e \x01(\r\x12\x10\n\x08paceType\x18\x1f \x01(\r\x12\x15\n\rfromPaceValue\x18 \x01(\x02\x12\x13\n\x0btoPaceValue\x18! \x01(\x02\x12\x19\n\x11\x64urationInSeconds\x18\" \x01(\r\x12\x0f\n\x07\x65vs_f35\x18# \x01(\r\x12\x12\n\njerseyHash\x18$ \x01(\x04\x12\x0f\n\x07\x65vs_f37\x18% \x01(\x08\x12\x0f\n\x07\x65vs_f38\x18& \x01(\r\x12\x14\n\x0c\x61uxiliaryUrl\x18\' \x01(\t\x12\x10\n\x08\x62ikeHash\x18( \x01(\x04\x12\x17\n\x0finvitedSweepers\x18) \x03(\x04\x12\x0f\n\x07\x65vs_f42\x18* \x01(\x04\x12\x11\n\tcustomUrl\x18+ \x01(\t\x12\x0f\n\x07\x65vs_f44\x18, \x01(\x08\x12\x0c\n\x04tags\x18- \x01(\t\x12\x19\n\x11lateJoinInMinutes\x18. \x01(\r\x12\x11\n\tcourse_id\x18/ \x01(\x04\x12\x0f\n\x07\x65vs_f48\x18\x30 \x01(\x04\x12\x10\n\x08routeUrl\x18\x31 \x01(\t\x12\x0f\n\x07\x65vs_f50\x18\x32 \x03(\x05\x12\x0f\n\x07\x65vs_f51\x18\x33 \x01(\x08\"g\n\x15MicroserviceEventData\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12\x65xternalResourceId\x18\x02 \x01(\x0c\x12$\n\nvisibility\x18\x03 \x01(\x0e\x32\x10.EventVisibility\"D\n\x13\x45ventSeriesProtobuf\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"\x7f\n\x15\x45ventTimeTrialOptions\x12\x1c\n\x14timeGapBetweenRowsMs\x18\x01 \x01(\r\x12\x0f\n\x07maxRows\x18\x02 \x01(\r\x12\x17\n\x0fmaxRidersPerRow\x18\x03 \x01(\r\x12\x0e\n\x06\x65vt_f4\x18\x04 \x01(\r\x12\x0e\n\x06\x65vt_f5\x18\x05 \x01(\x04\"\xcf\x06\n\x05\x45vent\x12\n\n\x02id\x18\x01 \x02(\x04\x12\x14\n\x0cserver_realm\x18\x02 \x01(\x04\x12\x0c\n\x04name\x18\x03 \x02(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x12\n\neventStart\x18\x05 \x01(\x04\x12\x0c\n\x04\x65_f6\x18\x06 \x01(\t\x12\x18\n\x10\x64istanceInMeters\x18\x07 \x01(\x02\x12\x0c\n\x04laps\x18\x08 \x01(\r\x12\x0c\n\x04\x65_f9\x18\t \x01(\r\x12(\n\x08\x63\x61tegory\x18\n \x03(\x0b\x32\x16.EventSubgroupProtobuf\x12\r\n\x05\x65_f11\x18\x0b \x01(\t\x12\x10\n\x08imageUrl\x18\x0c \x01(\t\x12\x19\n\x11\x64urationInSeconds\x18\r \x01(\r\x12\x10\n\x08route_id\x18\x0e \x01(\x04\x12\x10\n\x08rules_id\x18\x0f \x01(\x04\x12\r\n\x05\x65_f16\x18\x10 \x01(\r\x12\x0f\n\x07visible\x18\x11 \x01(\x08\x12\x12\n\njerseyHash\x18\x12 \x01(\x04\x12\r\n\x05\x65_f19\x18\x13 \x01(\t\x12\r\n\x05\x65_f20\x18\x14 \x01(\t\x12\r\n\x05\x65_f21\x18\x15 \x01(\t\x12\x15\n\x05sport\x18\x16 \x01(\x0e\x32\x06.Sport\x12\r\n\x05\x65_f23\x18\x17 \x01(\x04\x12\x1d\n\teventType\x18\x18 \x01(\x0e\x32\n.EventType\x12\r\n\x05\x65_f25\x18\x19 \x01(\x04\x12\r\n\x05\x65_f26\x18\x1a \x01(\t\x12\r\n\x05\x65_f27\x18\x1b \x01(\x04\x12\x1e\n\x16overrideMapPreferences\x18\x1c \x01(\x08\x12\"\n\x1ainvisibleToNonParticipants\x18\x1d \x01(\x08\x12&\n\x08\x65vSeries\x18\x1e \x01(\x0b\x32\x14.EventSeriesProtobuf\x12\x0c\n\x04tags\x18\x1f \x01(\t\x12\r\n\x05\x65_f32\x18 \x01(\x04\x12\x0e\n\x06\x65_wtrl\x18! \x01(\x08\x12\x19\n\x11lateJoinInMinutes\x18\" \x01(\r\x12\x11\n\tcourse_id\x18# \x01(\x04\x12#\n\x03tto\x18$ \x01(\x0b\x32\x16.EventTimeTrialOptions\x12\r\n\x05\x65_f37\x18% \x01(\t\x12\r\n\x05\x65_f38\x18& \x01(\t\x12\r\n\x05\x65_f39\x18\' \x01(\r\x12$\n\x04msed\x18( \x01(\x0b\x32\x16.MicroserviceEventData\x12\r\n\x05\x65_f41\x18) \x03(\r\" \n\x06\x45vents\x12\x16\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x06.Event\"\xc9\x02\n\x11PrivateEventProto\x12\n\n\x02id\x18\x01 \x02(\x04\x12\x15\n\x05sport\x18\x02 \x01(\x0e\x32\x06.Sport\x12\x12\n\neventStart\x18\x03 \x01(\x04\x12\x0f\n\x07routeId\x18\x04 \x01(\x04\x12\x15\n\rstartLocation\x18\x05 \x01(\x04\x12\x19\n\x11\x64urationInSeconds\x18\x06 \x01(\r\x12\x18\n\x10\x64istanceInMeters\x18\x07 \x01(\x02\x12\x13\n\x0b\x64\x65scription\x18\x08 \x01(\t\x12\x13\n\x0bworkoutHash\x18\t \x01(\x04\x12\x13\n\x0borganizerId\x18\n \x01(\x04\x12\'\n\x0c\x65ventInvites\x18\x0b \x03(\x0b\x32\x11.EventInviteProto\x12\x13\n\x0bshowResults\x18\x0c \x01(\x08\x12\x0c\n\x04laps\x18\r \x01(\r\x12\x15\n\rrubberbanding\x18\x0e \x01(\x08\"\x8f\x01\n\x13LateJoinInformation\x12\x0f\n\x07road_id\x18\x01 \x01(\x04\x12\x11\n\troad_time\x18\x02 \x01(\x02\x12\x12\n\nis_forward\x18\x03 \x01(\x08\x12\x13\n\x0borganizerId\x18\x04 \x01(\x03\x12\r\n\x05lj_f5\x18\x05 \x01(\r\x12\r\n\x05lj_f6\x18\x06 \x01(\r\x12\r\n\x05lj_f7\x18\x07 \x01(\r*<\n\x11\x45ventInviteStatus\x12\x0b\n\x07PENDING\x10\x00\x12\x0c\n\x08\x41\x43\x43\x45PTED\x10\x01\x12\x0c\n\x08REJECTED\x10\x02*V\n\x0f\x45ventVisibility\x12\x0b\n\x07\x45V_NULL\x10\x00\x12\x10\n\x0c\x45V_PUB_SHARE\x10\x01\x12\x12\n\x0e\x45V_BY_RESOURCE\x10\x02\x12\x10\n\x0c\x45V_SHAREABLE\x10\x03*\xa5\x01\n\x0b\x45ventTypeV2\x12\x16\n\x12\x45VENT_TYPE_UNKNOWN\x10\x00\x12\x15\n\x11\x45VENT_TYPE_EFONDO\x10\x01\x12\x13\n\x0f\x45VENT_TYPE_RACE\x10\x02\x12\x19\n\x15\x45VENT_TYPE_GROUP_RIDE\x10\x03\x12\x1c\n\x18\x45VENT_TYPE_GROUP_WORKOUT\x10\x04\x12\x19\n\x15\x45VENT_TYPE_TIME_TRIAL\x10\x05*d\n\tEventType\x12\x0e\n\nET_UNKNOWN\x10\x00\x12\n\n\x06\x45\x46ONDO\x10\x01\x12\x08\n\x04RACE\x10\x02\x12\x0e\n\nGROUP_RIDE\x10\x03\x12\x11\n\rGROUP_WORKOUT\x10\x04\x12\x0e\n\nTIME_TRIAL\x10\x05*o\n\x0c\x45ventCulling\x12\x15\n\x11\x43ULLING_UNDEFINED\x10\x00\x12\x15\n\x11\x43ULLING_EVERYBODY\x10\x01\x12\x16\n\x12\x43ULLING_EVENT_ONLY\x10\x02\x12\x19\n\x15\x43ULLING_SUBGROUP_ONLY\x10\x03') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x65vents.proto\x1a\rprofile.proto\"\xd5\x01\n\x13InvitedProfileProto\x12\x11\n\tplayer_id\x18\x01 \x02(\x04\x12\x11\n\tfirstName\x18\x02 \x01(\t\x12\x10\n\x08lastName\x18\x03 \x01(\t\x12\x10\n\x08imageSrc\x18\x04 \x01(\t\x12\x1c\n\x14\x65nrolledZwiftAcademy\x18\x05 \x01(\x08\x12\x0c\n\x04male\x18\x06 \x01(\x08\x12 \n\x0bplayer_type\x18\x07 \x01(\x0e\x32\x0b.PlayerType\x12&\n\x0e\x65vent_category\x18\x08 \x01(\x0e\x32\x0e.EventCategory\"]\n\x10\x45ventInviteProto\x12%\n\x07profile\x18\x01 \x01(\x0b\x32\x14.InvitedProfileProto\x12\"\n\x06status\x18\x02 \x02(\x0e\x32\x12.EventInviteStatus\"\xcb\x03\n\x15PrivateEventFeedProto\x12\x10\n\x08\x65vent_id\x18\x01 \x02(\x04\x12\x15\n\x05sport\x18\x02 \x01(\x0e\x32\x06.Sport\x12\x1a\n\x12\x65ventSubgroupStart\x18\x03 \x01(\x04\x12\x10\n\x08route_id\x18\x04 \x01(\x04\x12\x19\n\x11\x64urationInSeconds\x18\x05 \x01(\r\x12\x18\n\x10\x64istanceInMeters\x18\x06 \x01(\x02\x12\x15\n\ransweredCount\x18\x07 \x01(\x04\x12\x19\n\x11invitedTotalCount\x18\x08 \x01(\r\x12\x1d\n\x15\x61\x63\x63\x65ptedFolloweeCount\x18\t \x01(\r\x12\x1a\n\x12\x61\x63\x63\x65ptedTotalCount\x18\n \x01(\r\x12\x19\n\x11organizerImageUrl\x18\x0b \x01(\t\x12\x1a\n\x12organizerProfileId\x18\x0c \x01(\x04\x12\x1a\n\x12organizerFirstName\x18\r \x01(\t\x12\x19\n\x11organizerLastName\x18\x0e \x01(\t\x12\x12\n\nupdateDate\x18\x0f \x01(\x04\x12\x12\n\nsubgroupId\x18\x10 \x01(\x04\x12\x0c\n\x04laps\x18\x11 \x01(\r\x12\x15\n\rrubberbanding\x18\x12 \x01(\x08\"@\n\x19PrivateEventFeedListProto\x12#\n\x03pef\x18\x01 \x03(\x0b\x32\x16.PrivateEventFeedProto\"F\n\x11PlayerJoinedEvent\x12\x0e\n\x06rel_id\x18\x01 \x02(\x04\x12\x11\n\tplayer_id\x18\x02 \x01(\x04\x12\x0e\n\x06pje_f3\x18\x03 \x01(\x04\"D\n\x0fPlayerLeftEvent\x12\x0e\n\x06rel_id\x18\x01 \x02(\x04\x12\x11\n\tplayer_id\x18\x02 \x01(\x04\x12\x0e\n\x06ple_f3\x18\x03 \x01(\x04\"\xd3\x07\n\x15\x45ventSubgroupProtobuf\x12\n\n\x02id\x18\x01 \x02(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0e\n\x06\x65vs_f4\x18\x04 \x01(\r\x12\x0e\n\x06\x65vs_f5\x18\x05 \x01(\r\x12\x0e\n\x06\x65vs_f6\x18\x06 \x01(\r\x12\r\n\x05scode\x18\x07 \x01(\t\x12\x10\n\x08rules_id\x18\x08 \x01(\x04\x12\x19\n\x11registrationStart\x18\t \x01(\x04\x12\x1b\n\x13registrationStartWT\x18\n \x01(\x04\x12\x17\n\x0fregistrationEnd\x18\x0b \x01(\x04\x12\x19\n\x11registrationEndWT\x18\x0c \x01(\x04\x12\x13\n\x0blineUpStart\x18\r \x01(\x04\x12\x15\n\rlineUpStartWT\x18\x0e \x01(\x04\x12\x11\n\tlineUpEnd\x18\x0f \x01(\x04\x12\x13\n\x0blineUpEndWT\x18\x10 \x01(\x04\x12\x1a\n\x12\x65ventSubgroupStart\x18\x11 \x01(\x04\x12\x1c\n\x14\x65ventSubgroupStartWT\x18\x12 \x01(\x04\x12\x0f\n\x07\x65vs_f19\x18\x13 \x01(\x04\x12\x0f\n\x07\x65vs_f20\x18\x14 \x01(\x04\x12\x0f\n\x07\x65vs_f21\x18\x15 \x01(\x08\x12\x10\n\x08route_id\x18\x16 \x02(\x04\x12\x16\n\x0einvitedLeaders\x18\x17 \x03(\x04\x12\x18\n\x10\x64istanceInMeters\x18\x18 \x01(\x02\x12\x0c\n\x04laps\x18\x19 \x01(\r\x12\x15\n\rstartLocation\x18\x1d \x01(\x04\x12\r\n\x05label\x18\x1e \x01(\r\x12\x10\n\x08paceType\x18\x1f \x01(\r\x12\x15\n\rfromPaceValue\x18 \x01(\x02\x12\x13\n\x0btoPaceValue\x18! \x01(\x02\x12\x19\n\x11\x64urationInSeconds\x18\" \x01(\r\x12\x0f\n\x07\x65vs_f35\x18# \x01(\r\x12\x12\n\njerseyHash\x18$ \x01(\x04\x12\x0f\n\x07\x65vs_f37\x18% \x01(\x08\x12\x0f\n\x07\x65vs_f38\x18& \x01(\r\x12\x14\n\x0c\x61uxiliaryUrl\x18\' \x01(\t\x12\x10\n\x08\x62ikeHash\x18( \x01(\x04\x12\x17\n\x0finvitedSweepers\x18) \x03(\x04\x12\x0f\n\x07\x65vs_f42\x18* \x01(\x04\x12\x11\n\tcustomUrl\x18+ \x01(\t\x12\x0f\n\x07\x65vs_f44\x18, \x01(\x08\x12\x0c\n\x04tags\x18- \x01(\t\x12\x19\n\x11lateJoinInMinutes\x18. \x01(\r\x12\x11\n\tcourse_id\x18/ \x01(\x04\x12\x0f\n\x07\x65vs_f48\x18\x30 \x01(\x04\x12\x10\n\x08routeUrl\x18\x31 \x01(\t\x12\x0f\n\x07\x65vs_f50\x18\x32 \x03(\x05\x12\x0f\n\x07\x65vs_f51\x18\x33 \x01(\x08\"g\n\x15MicroserviceEventData\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12\x65xternalResourceId\x18\x02 \x01(\x0c\x12$\n\nvisibility\x18\x03 \x01(\x0e\x32\x10.EventVisibility\"D\n\x13\x45ventSeriesProtobuf\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"\x7f\n\x15\x45ventTimeTrialOptions\x12\x1c\n\x14timeGapBetweenRowsMs\x18\x01 \x01(\r\x12\x0f\n\x07maxRows\x18\x02 \x01(\r\x12\x17\n\x0fmaxRidersPerRow\x18\x03 \x01(\r\x12\x0e\n\x06\x65vt_f4\x18\x04 \x01(\r\x12\x0e\n\x06\x65vt_f5\x18\x05 \x01(\x04\"\xcf\x06\n\x05\x45vent\x12\n\n\x02id\x18\x01 \x02(\x04\x12\x14\n\x0cserver_realm\x18\x02 \x01(\x04\x12\x0c\n\x04name\x18\x03 \x02(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x12\n\neventStart\x18\x05 \x01(\x04\x12\x0c\n\x04\x65_f6\x18\x06 \x01(\t\x12\x18\n\x10\x64istanceInMeters\x18\x07 \x01(\x02\x12\x0c\n\x04laps\x18\x08 \x01(\r\x12\x0c\n\x04\x65_f9\x18\t \x01(\r\x12(\n\x08\x63\x61tegory\x18\n \x03(\x0b\x32\x16.EventSubgroupProtobuf\x12\r\n\x05\x65_f11\x18\x0b \x01(\t\x12\x10\n\x08imageUrl\x18\x0c \x01(\t\x12\x19\n\x11\x64urationInSeconds\x18\r \x01(\r\x12\x10\n\x08route_id\x18\x0e \x01(\x04\x12\x10\n\x08rules_id\x18\x0f \x01(\x04\x12\r\n\x05\x65_f16\x18\x10 \x01(\r\x12\x0f\n\x07visible\x18\x11 \x01(\x08\x12\x12\n\njerseyHash\x18\x12 \x01(\x04\x12\r\n\x05\x65_f19\x18\x13 \x01(\t\x12\r\n\x05\x65_f20\x18\x14 \x01(\t\x12\r\n\x05\x65_f21\x18\x15 \x01(\t\x12\x15\n\x05sport\x18\x16 \x01(\x0e\x32\x06.Sport\x12\r\n\x05\x65_f23\x18\x17 \x01(\x04\x12\x1d\n\teventType\x18\x18 \x01(\x0e\x32\n.EventType\x12\r\n\x05\x65_f25\x18\x19 \x01(\x04\x12\r\n\x05\x65_f26\x18\x1a \x01(\t\x12\r\n\x05\x65_f27\x18\x1b \x01(\x04\x12\x1e\n\x16overrideMapPreferences\x18\x1c \x01(\x08\x12\"\n\x1ainvisibleToNonParticipants\x18\x1d \x01(\x08\x12&\n\x08\x65vSeries\x18\x1e \x01(\x0b\x32\x14.EventSeriesProtobuf\x12\x0c\n\x04tags\x18\x1f \x01(\t\x12\r\n\x05\x65_f32\x18 \x01(\x04\x12\x0e\n\x06\x65_wtrl\x18! \x01(\x08\x12\x19\n\x11lateJoinInMinutes\x18\" \x01(\r\x12\x11\n\tcourse_id\x18# \x01(\x04\x12#\n\x03tto\x18$ \x01(\x0b\x32\x16.EventTimeTrialOptions\x12\r\n\x05\x65_f37\x18% \x01(\t\x12\r\n\x05\x65_f38\x18& \x01(\t\x12\r\n\x05\x65_f39\x18\' \x01(\r\x12$\n\x04msed\x18( \x01(\x0b\x32\x16.MicroserviceEventData\x12\r\n\x05\x65_f41\x18) \x03(\r\" \n\x06\x45vents\x12\x16\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x06.Event\"\xc9\x02\n\x11PrivateEventProto\x12\n\n\x02id\x18\x01 \x02(\x04\x12\x15\n\x05sport\x18\x02 \x01(\x0e\x32\x06.Sport\x12\x12\n\neventStart\x18\x03 \x01(\x04\x12\x0f\n\x07routeId\x18\x04 \x01(\x04\x12\x15\n\rstartLocation\x18\x05 \x01(\x04\x12\x19\n\x11\x64urationInSeconds\x18\x06 \x01(\r\x12\x18\n\x10\x64istanceInMeters\x18\x07 \x01(\x02\x12\x13\n\x0b\x64\x65scription\x18\x08 \x01(\t\x12\x13\n\x0bworkoutHash\x18\t \x01(\x04\x12\x13\n\x0borganizerId\x18\n \x01(\x04\x12\'\n\x0c\x65ventInvites\x18\x0b \x03(\x0b\x32\x11.EventInviteProto\x12\x13\n\x0bshowResults\x18\x0c \x01(\x08\x12\x0c\n\x04laps\x18\r \x01(\r\x12\x15\n\rrubberbanding\x18\x0e \x01(\x08\"\x8f\x01\n\x13LateJoinInformation\x12\x0f\n\x07road_id\x18\x01 \x01(\x04\x12\x11\n\troad_time\x18\x02 \x01(\x02\x12\x12\n\nis_forward\x18\x03 \x01(\x08\x12\x13\n\x0borganizerId\x18\x04 \x01(\x03\x12\r\n\x05lj_f5\x18\x05 \x01(\r\x12\r\n\x05lj_f6\x18\x06 \x01(\r\x12\r\n\x05lj_f7\x18\x07 \x01(\r*<\n\x11\x45ventInviteStatus\x12\x0b\n\x07PENDING\x10\x00\x12\x0c\n\x08\x41\x43\x43\x45PTED\x10\x01\x12\x0c\n\x08REJECTED\x10\x02*V\n\x0f\x45ventVisibility\x12\x0b\n\x07\x45V_NULL\x10\x00\x12\x10\n\x0c\x45V_PUB_SHARE\x10\x01\x12\x12\n\x0e\x45V_BY_RESOURCE\x10\x02\x12\x10\n\x0c\x45V_SHAREABLE\x10\x03*\xa5\x01\n\x0b\x45ventTypeV2\x12\x16\n\x12\x45VENT_TYPE_UNKNOWN\x10\x00\x12\x15\n\x11\x45VENT_TYPE_EFONDO\x10\x01\x12\x13\n\x0f\x45VENT_TYPE_RACE\x10\x02\x12\x19\n\x15\x45VENT_TYPE_GROUP_RIDE\x10\x03\x12\x1c\n\x18\x45VENT_TYPE_GROUP_WORKOUT\x10\x04\x12\x19\n\x15\x45VENT_TYPE_TIME_TRIAL\x10\x05*d\n\tEventType\x12\x0e\n\nET_UNKNOWN\x10\x00\x12\n\n\x06\x45\x46ONDO\x10\x01\x12\x08\n\x04RACE\x10\x02\x12\x0e\n\nGROUP_RIDE\x10\x03\x12\x11\n\rGROUP_WORKOUT\x10\x04\x12\x0e\n\nTIME_TRIAL\x10\x05*o\n\x0c\x45ventCulling\x12\x15\n\x11\x43ULLING_UNDEFINED\x10\x00\x12\x15\n\x11\x43ULLING_EVERYBODY\x10\x01\x12\x16\n\x12\x43ULLING_EVENT_ONLY\x10\x02\x12\x19\n\x15\x43ULLING_SUBGROUP_ONLY\x10\x03*:\n\rEventCategory\x12\r\n\tEC_FEMALE\x10\x00\x12\x0b\n\x07\x45\x43_MALE\x10\x01\x12\r\n\tEC_BINARY\x10\x02') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'events_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - _EVENTINVITESTATUS._serialized_start=3620 - _EVENTINVITESTATUS._serialized_end=3680 - _EVENTVISIBILITY._serialized_start=3682 - _EVENTVISIBILITY._serialized_end=3768 - _EVENTTYPEV2._serialized_start=3771 - _EVENTTYPEV2._serialized_end=3936 - _EVENTTYPE._serialized_start=3938 - _EVENTTYPE._serialized_end=4038 - _EVENTCULLING._serialized_start=4040 - _EVENTCULLING._serialized_end=4151 + _EVENTINVITESTATUS._serialized_start=3660 + _EVENTINVITESTATUS._serialized_end=3720 + _EVENTVISIBILITY._serialized_start=3722 + _EVENTVISIBILITY._serialized_end=3808 + _EVENTTYPEV2._serialized_start=3811 + _EVENTTYPEV2._serialized_end=3976 + _EVENTTYPE._serialized_start=3978 + _EVENTTYPE._serialized_end=4078 + _EVENTCULLING._serialized_start=4080 + _EVENTCULLING._serialized_end=4191 + _EVENTCATEGORY._serialized_start=4193 + _EVENTCATEGORY._serialized_end=4251 _INVITEDPROFILEPROTO._serialized_start=32 - _INVITEDPROFILEPROTO._serialized_end=205 - _EVENTINVITEPROTO._serialized_start=207 - _EVENTINVITEPROTO._serialized_end=300 - _PRIVATEEVENTFEEDPROTO._serialized_start=303 - _PRIVATEEVENTFEEDPROTO._serialized_end=762 - _PRIVATEEVENTFEEDLISTPROTO._serialized_start=764 - _PRIVATEEVENTFEEDLISTPROTO._serialized_end=828 - _PLAYERJOINEDEVENT._serialized_start=830 - _PLAYERJOINEDEVENT._serialized_end=900 - _PLAYERLEFTEVENT._serialized_start=902 - _PLAYERLEFTEVENT._serialized_end=970 - _EVENTSUBGROUPPROTOBUF._serialized_start=973 - _EVENTSUBGROUPPROTOBUF._serialized_end=1952 - _MICROSERVICEEVENTDATA._serialized_start=1954 - _MICROSERVICEEVENTDATA._serialized_end=2057 - _EVENTSERIESPROTOBUF._serialized_start=2059 - _EVENTSERIESPROTOBUF._serialized_end=2127 - _EVENTTIMETRIALOPTIONS._serialized_start=2129 - _EVENTTIMETRIALOPTIONS._serialized_end=2256 - _EVENT._serialized_start=2259 - _EVENT._serialized_end=3106 - _EVENTS._serialized_start=3108 - _EVENTS._serialized_end=3140 - _PRIVATEEVENTPROTO._serialized_start=3143 - _PRIVATEEVENTPROTO._serialized_end=3472 - _LATEJOININFORMATION._serialized_start=3475 - _LATEJOININFORMATION._serialized_end=3618 + _INVITEDPROFILEPROTO._serialized_end=245 + _EVENTINVITEPROTO._serialized_start=247 + _EVENTINVITEPROTO._serialized_end=340 + _PRIVATEEVENTFEEDPROTO._serialized_start=343 + _PRIVATEEVENTFEEDPROTO._serialized_end=802 + _PRIVATEEVENTFEEDLISTPROTO._serialized_start=804 + _PRIVATEEVENTFEEDLISTPROTO._serialized_end=868 + _PLAYERJOINEDEVENT._serialized_start=870 + _PLAYERJOINEDEVENT._serialized_end=940 + _PLAYERLEFTEVENT._serialized_start=942 + _PLAYERLEFTEVENT._serialized_end=1010 + _EVENTSUBGROUPPROTOBUF._serialized_start=1013 + _EVENTSUBGROUPPROTOBUF._serialized_end=1992 + _MICROSERVICEEVENTDATA._serialized_start=1994 + _MICROSERVICEEVENTDATA._serialized_end=2097 + _EVENTSERIESPROTOBUF._serialized_start=2099 + _EVENTSERIESPROTOBUF._serialized_end=2167 + _EVENTTIMETRIALOPTIONS._serialized_start=2169 + _EVENTTIMETRIALOPTIONS._serialized_end=2296 + _EVENT._serialized_start=2299 + _EVENT._serialized_end=3146 + _EVENTS._serialized_start=3148 + _EVENTS._serialized_end=3180 + _PRIVATEEVENTPROTO._serialized_start=3183 + _PRIVATEEVENTPROTO._serialized_end=3512 + _LATEJOININFORMATION._serialized_start=3515 + _LATEJOININFORMATION._serialized_end=3658 # @@protoc_insertion_point(module_scope) diff --git a/zwift_offline.py b/zwift_offline.py index de06c0f1..eafc7fca 100644 --- a/zwift_offline.py +++ b/zwift_offline.py @@ -2522,7 +2522,7 @@ def api_private_event_edit(meetup_id): if not peer_id in newEventInviteeIds: create_zca_notification(peer_id, org_json_pe, newEventInvites[0]["invitedProfile"]) player_update.rel_id = peer_id - enqueue_wa_event_invites(peer_id, player_update) + enqueue_player_update(peer_id, player_update.SerializeToString()) p_partial_profile = get_partial_profile(peer_id) newEventInvites.append({"invitedProfile": p_partial_profile.to_json(), "status": "PENDING"}) org_json_pe['eventInvites'] = newEventInvites @@ -2537,15 +2537,11 @@ def api_private_event_edit(meetup_id): db.session.commit() return jsonify({"id":meetup_id}) -def enqueue_wa_event_invites(player_id, wa): - for wat in (udp_node_msgs_pb2.WA_TYPE.WAT_EVENT, udp_node_msgs_pb2.WA_TYPE.WAT_INV_W): - wa.wa_type = wat - enqueue_player_update(player_id, wa.SerializeToString()) - def create_wa_event_invites(json_pe): pe = events_pb2.Event() player_update = udp_node_msgs_pb2.WorldAttribute() player_update.server_realm = udp_node_msgs_pb2.ZofflineConstants.RealmID + player_update.wa_type = udp_node_msgs_pb2.WA_TYPE.WAT_INV_W player_update.world_time_born = world_time() player_update.world_time_expire = world_time() + 60000 player_update.wa_f12 = 1 @@ -2612,12 +2608,12 @@ def api_private_event_new(): #{"culling":true,"description":"mesg","distanceInMe create_event_wat(ev_sg_id, udp_node_msgs_pb2.WA_TYPE.WAT_JOIN_E, events_pb2.PlayerJoinedEvent(), online.keys()) player_update = create_wa_event_invites(json_pe) - enqueue_wa_event_invites(current_user.player_id, player_update) + enqueue_player_update(current_user.player_id, player_update.SerializeToString()) for peer_id in json_pe['invitedProfileIds']: create_zca_notification(peer_id, json_pe, eventInvites[0]["invitedProfile"]) player_update.rel_id = peer_id - enqueue_wa_event_invites(peer_id, player_update) + enqueue_player_update(peer_id, player_update.SerializeToString()) p_partial_profile = get_partial_profile(peer_id) eventInvites.append({"invitedProfile": p_partial_profile.to_json(), "status": "PENDING"}) json_pe['eventInvites'] = eventInvites @@ -2701,11 +2697,12 @@ def jsonPrivateEventToProtobuf(je): inv.profile.player_id = jp['id'] inv.profile.firstName = jp['firstName'] inv.profile.lastName = jp['lastName'] - if jp['imageSrc'] is not None: + if jp['imageSrc']: inv.profile.imageSrc = jp['imageSrc'] inv.profile.enrolledZwiftAcademy = jp['enrolledZwiftAcademy'] inv.profile.male = jp['male'] inv.profile.player_type = profile_pb2.PlayerType.Value(jp['playerType']) + inv.profile.event_category = int(jp['male']) inv.status = events_pb2.EventInviteStatus.Value(jinv['status']) ret.showResults = je['showResults'] ret.laps = je['laps']