deepsync commited on
Commit
0a6a67c
·
verified ·
1 Parent(s): 92323ac

Update audio_sep_splitter.py

Browse files
Files changed (1) hide show
  1. audio_sep_splitter.py +14 -2
audio_sep_splitter.py CHANGED
@@ -182,13 +182,25 @@ def batch_process_for_file(input_path, output_path, stem, filter_type, splitter)
182
 
183
 
184
  def batch_process(input_path, output_path, stem, filter_type, splitter):
 
 
 
 
 
 
 
 
185
  if os.path.isfile(input_path):
186
- batch_process_for_file(input_path, output_path, stem, filter_type, splitter)
 
187
  else:
 
188
  for path in os.listdir(input_path):
189
  path = os.path.join(input_path, path)
190
  if os.path.isfile(path):
191
- batch_process_for_file(path, output_path, stem, filter_type, splitter)
 
 
192
 
193
 
194
  def main():
 
182
 
183
 
184
  def batch_process(input_path, output_path, stem, filter_type, splitter):
185
+ if type(input_path) is list:
186
+ downloaded_files = []
187
+ for path in input_path:
188
+ if os.path.isfile(path):
189
+ downloaded_file = batch_process_for_file(path, output_path, stem, filter_type, splitter)
190
+ downloaded_files.append(downloaded_file)
191
+ return downloaded_files
192
+
193
  if os.path.isfile(input_path):
194
+ downloaded_file = batch_process_for_file(input_path, output_path, stem, filter_type, splitter)
195
+ return downloaded_file
196
  else:
197
+ downloaded_files = []
198
  for path in os.listdir(input_path):
199
  path = os.path.join(input_path, path)
200
  if os.path.isfile(path):
201
+ downloaded_file = batch_process_for_file(path, output_path, stem, filter_type, splitter)
202
+ downloaded_files.append(downloaded_file)
203
+ return downloaded_files
204
 
205
 
206
  def main():