extract_stems()Bug — always returns drum_path, never results["mix"]
The bug is in extract_stems() in init.py (the public API wrapper).
drum_path = results.get("drums") or results.get("drums_stem")
if full:
return {
"status": "success",
"drum_stem_path": drum_path,
"original_file": audio_path,
"output_directory": str(output_dir),
}
return drum_path
It always returns the drum path, even when drumless=True. The separate_audio() function correctly creates the backing track and stores it in results["mix"], but extract_stems() ignores it and only ever returns the drums path.
Need to fix drumscript/__init__.py, replace return block in extract_stems() with:
drum_path = results.get("drums") or results.get("drums_stem")
if full:
return {
"status": "success",
"drum_stem_path": drum_path,
"mix_path": results.get("mix"), # <== ADD THIS
"original_file": audio_path,
"output_directory": str(output_dir),
}
# If drumless was requested, return the backing track, not the drums
if drumless and results.get("mix"): # <== ADD THIS
return results["mix"] # <== ADD THIS
return drum_path
extract_stems()Bug — always returns drum_path, never results["mix"]
The bug is in extract_stems() in init.py (the public API wrapper).
It always returns the drum path, even when drumless=True. The separate_audio() function correctly creates the backing track and stores it in results["mix"], but extract_stems() ignores it and only ever returns the drums path.
Need to fix
drumscript/__init__.py, replace return block in extract_stems() with: