Skip to content

fix(api): stop doubling the extension on stem zip filenames - #1061

Merged
dylanjeffers merged 1 commit into
mainfrom
fix/stems-zip-title-extension
Oct 23, 2026
Merged

dylanjeffers merged 1 commit into
mainfrom
fix/stems-zip-title-extension

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Follow-up to #1060, found validating it in prod.

Stems indexed with no orig_filename often have the upload's filename as their title (" 🍕DRUMS.wav"). The zip's fallback took createFilename's title + ".mp3", stripped the .mp3, and added the extension from the blob's content type. Andrew Lux's "Alone" zip came out with DRUMS.wav.wav, LEADS.wav.wav and so on, 11 of 12 entries. Now a trailing audio extension in the title is replaced instead of kept. Tests cover the emoji/whitespace title, case, a different content type, and a title with a dot but no extension.

Not changed here: the single-file /tracks/{id}/download names the same files DRUMS.wav.mp3 even though it serves the WAV, because createFilename assumes the transcode whenever orig_filename is empty.

🤖 Generated with Claude Code

Stems with no orig_filename often carry the upload's extension in the title
("  🍕DRUMS.wav"), so the zip named them "DRUMS.wav.wav". Swap a trailing
audio extension in the title for the one from the blob's content type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dylanjeffers
dylanjeffers merged commit 5828479 into main Oct 23, 2026
2 checks passed
@dylanjeffers
dylanjeffers deleted the fix/stems-zip-title-extension branch October 23, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant