MCPcopy
hub / github.com/diffgram/diffgram / new_input

Method new_input

walrus/methods/video/video_preprocess.py:302–328  ·  view source on GitHub ↗

Careful for video_split_duration...shouldn't add it since we condition on it NOTE here we have self.parent_input available as stored on Video Preprocess class but parent_input is not available on a generic input object see notes in Input class

(self)

Source from the content-addressed store, hash-verified

300 return True
301
302 def new_input(self):
303 """
304 Careful for video_split_duration...shouldn't add it
305 since we condition on it
306
307 NOTE here we have self.parent_input available
308 as stored on Video Preprocess class but parent_input is not available
309 on a generic input object see notes in Input class
310 """
311
312 self.input = Input.new(
313 parent_input_id = self.parent_input.id,
314 project = self.project,
315 media_type = "video",
316 type = "from_video_split",
317 job_id = self.parent_input.job_id,
318 directory_id = self.parent_input.directory_id
319 )
320
321 self.session.add(self.input)
322 self.session.flush()
323
324 # Do we need .mp4 on end here?
325 self.input.raw_data_blob_path = settings.PROJECT_VIDEOS_BASE_DIR + \
326 str(self.project.id) + "/raw/" + str(self.input.id)
327
328 self.extension = ".mp4"
329
330 def try_to_commit(self):
331

Callers 1

splitMethod · 0.95

Calls 2

newMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected