Helps insure not forgetting stuff... does not add to session or flush because we may not always want to do that. Different ways files can come in here...
(
project = None,
project_id = None,
media_type: str = None,
type: str = None,
mode: str = None,
url: str = None,
raw_data_blob_path: str = None,
original_filename: str = None,
external_map_action: str = None,
task_action: str = None,
bucket_name: str = None,
job_id: int = None,
video_parent_length: int = None,
external_map_id: int = None,
task_id: int = None,
source_directory_id: int = None,
remove_link: bool = None,
add_link: bool = None,
copy_instance_list: bool = None,
allow_duplicates: bool = None,
directory_id: int = None,
connection_id: int = None,
file_id: int = None,
parent_file_id: int = None,
newly_copied_file_id: int = None,
instance_list: dict = None,
frame_packet_map: dict = None,
image_metadata: dict = None,
auto_correct_instances_from_image_metadata: bool = False,
sequence_map: dict = None,
processing_deferred: bool = False,
parent_input_id: int = None,
batch_id: int = None,
video_split_duration: int = None,
file_metadata: dict = None,
member_created_id: int = None,
text_data: str = None,
ordinal: int = 0
)
| 199 | |
| 200 | @staticmethod |
| 201 | def new( |
| 202 | project = None, |
| 203 | project_id = None, |
| 204 | media_type: str = None, |
| 205 | type: str = None, |
| 206 | mode: str = None, |
| 207 | url: str = None, |
| 208 | raw_data_blob_path: str = None, |
| 209 | original_filename: str = None, |
| 210 | external_map_action: str = None, |
| 211 | task_action: str = None, |
| 212 | bucket_name: str = None, |
| 213 | job_id: int = None, |
| 214 | video_parent_length: int = None, |
| 215 | external_map_id: int = None, |
| 216 | task_id: int = None, |
| 217 | source_directory_id: int = None, |
| 218 | remove_link: bool = None, |
| 219 | add_link: bool = None, |
| 220 | copy_instance_list: bool = None, |
| 221 | allow_duplicates: bool = None, |
| 222 | directory_id: int = None, |
| 223 | connection_id: int = None, |
| 224 | file_id: int = None, |
| 225 | parent_file_id: int = None, |
| 226 | newly_copied_file_id: int = None, |
| 227 | instance_list: dict = None, |
| 228 | frame_packet_map: dict = None, |
| 229 | image_metadata: dict = None, |
| 230 | auto_correct_instances_from_image_metadata: bool = False, |
| 231 | sequence_map: dict = None, |
| 232 | processing_deferred: bool = False, |
| 233 | parent_input_id: int = None, |
| 234 | batch_id: int = None, |
| 235 | video_split_duration: int = None, |
| 236 | file_metadata: dict = None, |
| 237 | member_created_id: int = None, |
| 238 | text_data: str = None, |
| 239 | ordinal: int = 0 |
| 240 | ): |
| 241 | """ |
| 242 | Helps insure not forgetting stuff... |
| 243 | |
| 244 | does not add to session or flush because we may not |
| 245 | always want to do that. |
| 246 | |
| 247 | Different ways files can come in here... |
| 248 | """ |
| 249 | |
| 250 | # Careful to check parent otherwise tries to recusrively split. |
| 251 | # if there is no parent then it's assumed to be the "original" |
| 252 | # if a video_split is provided then we use it. |
| 253 | if parent_input_id is None and video_split_duration is None: |
| 254 | video_split_duration = 30 |
| 255 | if project and not project_id: |
| 256 | project_id = project.id |
| 257 | input = Input( |
| 258 | project_id = project_id, |
no test coverage detected