File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1919
2020SPECIAL_CHARACTERS_IN_PROJECT_FOLDER_NAMES = set ('/\\ :*?"<>|' )
2121
22- _PROJECT_TYPES = {"Vector" : 1 , "Pixel" : 2 }
22+ _PROJECT_TYPES = {"Vector" : 1 , "Pixel" : 2 , "Video" : 3 }
2323
2424_ANNOTATION_STATUSES = {
2525 "NotStarted" : 1 ,
Original file line number Diff line number Diff line change @@ -127,6 +127,14 @@ def prepare_export(
127127 """
128128 if not isinstance (project , dict ):
129129 project = get_project_metadata_bare (project )
130+ if project ["type" ] == "Video" :
131+ if include_fuse or only_pinned :
132+ raise SABaseException (
133+ 0 ,
134+ "The function does not support include fuse and pin arguments "
135+ "for projects containing videos attached with URLs"
136+ )
137+
130138 upload_state = upload_state_int_to_str (project .get ("upload_state" ))
131139 if upload_state == "External" and include_fuse == True :
132140 logger .info (
@@ -144,11 +152,14 @@ def prepare_export(
144152 current_time = datetime .now ().strftime ("%b %d %Y %H:%M" )
145153 json_req = {
146154 "include" : annotation_statuses ,
147- "fuse" : int (include_fuse ),
148- "is_pinned" : int (only_pinned ),
149155 "coco" : 0 ,
150156 "time" : current_time
151157 }
158+ if project ["type" ] != "Video" :
159+ json_req ["fuse" ] = int (include_fuse )
160+ json_req ["is_pinned" ] = int (only_pinned )
161+ json_req ["coco" ] = 0
162+
152163 if folder_names is not None :
153164 json_req ["folder_names" ] = folder_names
154165 params = {'team_id' : team_id , 'project_id' : project_id }
You can’t perform that action at this time.
0 commit comments