- def prepare_file(self, input_path, output_path=None):
- audio = self.prepare_audio(input_path)
- duration = self.get_duration(input_path)
+ def update_data(self, audiobook):
+ data = self.get_data(audiobook)
+ data['id'] = audiobook.youtube_id
+ part = ",".join(data.keys())
+ youtube_call(
+ "PUT",
+ "https://www.googleapis.com/youtube/v3/videos",
+ params={"part": part},
+ json=data
+ )
+
+ def prepare_file(self, input_paths, output_path=None):
+ audio = self.prepare_audio(input_paths)
+ duration = self.get_duration(input_paths)