Adds a soundtrack to the server from a folder: picked with Add soundtrack… in the statistics toolbar, or dropped anywhere on the window. Closes#50.
Depends on Sansan/MusicServer#39 (the upload API, #33). Merge that first: this calls POST /soundtracks/uploads, PUT …/files/{file}, POST …/finish and DELETE ….
What it does
Lists the folder's songs with their sizes, and the total. The name comes from the folder and can be changed; characters the server refuses are replaced.
Uploads only MP3s, as the server takes no other. Other song files (ogg, flac, …) are listed greyed out as "not MP3, left out". Hidden files are skipped.
Disc folders are flattened with the disc's number first (Disc 2/01 Song.mp3 → 2-01 Song.mp3), since the server wants one folder. With only one disc folder, names stay as they are.
Sends one song at a time with a progress bar, reading one file at a time. A failed song is sent again twice; then the upload is cancelled on the server and the server's reason is shown. Closing the popup cancels it.
Not offered while the server syncs, offline (music folder), or without MP3s.
Afterwards search, the inspiration list and the statistics reload, so the new soundtrack shows up at once.
Tests
test_upload_folder.gd: MP3s in natural order, disc numbering (one disc vs several, folders without songs aren't discs), left-out files, hidden files, name cleaning, duplicate names.
test_upload_popup.gd: the calls in order with the right bodies and audio/mpeg; a retry that recovers; a song that keeps failing cancels the upload; a taken name shows the server's reason; closing cancels; no upload while syncing; dropping a folder or songs.
The screenshot tour has the popup ready and mid-upload; layout baseline retaken.
All 799 tests pass.
Tried against the real server
On the server's branch: dropped a two-disc test folder, uploaded it ("Added Upload test MusicPlayer with 3 songs"), saw it in Search and Statistics, and got the server's "already exists" reason on a second try. The test folder was then deleted and a sync removed the soundtrack again.
Adds a soundtrack to the server from a folder: picked with **Add soundtrack…** in the statistics toolbar, or dropped anywhere on the window. Closes #50.
**Depends on Sansan/MusicServer#39** (the upload API, #33). Merge that first: this calls `POST /soundtracks/uploads`, `PUT …/files/{file}`, `POST …/finish` and `DELETE …`.
## What it does
- Lists the folder's songs with their sizes, and the total. The name comes from the folder and can be changed; characters the server refuses are replaced.
- Uploads only MP3s, as the server takes no other. Other song files (ogg, flac, …) are listed greyed out as "not MP3, left out". Hidden files are skipped.
- Disc folders are flattened with the disc's number first (`Disc 2/01 Song.mp3` → `2-01 Song.mp3`), since the server wants one folder. With only one disc folder, names stay as they are.
- Sends one song at a time with a progress bar, reading one file at a time. A failed song is sent again twice; then the upload is cancelled on the server and the server's reason is shown. Closing the popup cancels it.
- Not offered while the server syncs, offline (music folder), or without MP3s.
- Afterwards search, the inspiration list and the statistics reload, so the new soundtrack shows up at once.
## Tests
- `test_upload_folder.gd`: MP3s in natural order, disc numbering (one disc vs several, folders without songs aren't discs), left-out files, hidden files, name cleaning, duplicate names.
- `test_upload_popup.gd`: the calls in order with the right bodies and `audio/mpeg`; a retry that recovers; a song that keeps failing cancels the upload; a taken name shows the server's reason; closing cancels; no upload while syncing; dropping a folder or songs.
- The screenshot tour has the popup ready and mid-upload; layout baseline retaken.
- All 799 tests pass.
## Tried against the real server
On the server's branch: dropped a two-disc test folder, uploaded it ("Added Upload test MusicPlayer with 3 songs"), saw it in Search and Statistics, and got the server's "already exists" reason on a second try. The test folder was then deleted and a sync removed the soundtrack again.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
"Add soundtrack…" in the statistics toolbar, or a folder dropped anywhere on
the window, opens a popup that lists the folder's songs and uploads them to
the server, which adds the soundtrack at once (Sansan/MusicServer#33).
- The name comes from the folder and can be changed; characters the server
refuses are replaced.
- Only MP3s are uploaded, as the server takes no other; other song files
are listed greyed out as left out. Hidden files are skipped.
- Disc folders are flattened with the disc's number first ("1-01 Title.mp3"),
as the server wants one folder. With one disc folder, names stay as
they are.
- Songs are sent one at a time with a progress bar, reading one file at a
time. A failed song is sent again twice, then the upload is cancelled
and the server's reason shown. Closing the popup cancels it too.
- Not offered while the server syncs, offline, or without MP3s.
- Afterwards search, the inspiration list and the statistics reload.
The API types come from the server's spec (Upload, UploadFile,
UploadRequest).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The API spec is now formatted like before (2-space indents, sorted keys):
develop's spec with the upload paths and types added, so the diff to
develop is only the upload API.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds a soundtrack to the server from a folder: picked with Add soundtrack… in the statistics toolbar, or dropped anywhere on the window. Closes #50.
Depends on Sansan/MusicServer#39 (the upload API, #33). Merge that first: this calls
POST /soundtracks/uploads,PUT …/files/{file},POST …/finishandDELETE ….What it does
Disc 2/01 Song.mp3→2-01 Song.mp3), since the server wants one folder. With only one disc folder, names stay as they are.Tests
test_upload_folder.gd: MP3s in natural order, disc numbering (one disc vs several, folders without songs aren't discs), left-out files, hidden files, name cleaning, duplicate names.test_upload_popup.gd: the calls in order with the right bodies andaudio/mpeg; a retry that recovers; a song that keeps failing cancels the upload; a taken name shows the server's reason; closing cancels; no upload while syncing; dropping a folder or songs.Tried against the real server
On the server's branch: dropped a two-disc test folder, uploaded it ("Added Upload test MusicPlayer with 3 songs"), saw it in Search and Statistics, and got the server's "already exists" reason on a second try. The test folder was then deleted and a sync removed the soundtrack again.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.