Files
romm/backend/tools
Georges-Antoine Assi 8b3aef2ec7 test(tools): generate soundtracks with the rest of the test data
Folds the standalone soundtrack seeder into generate_test_data.py, where
the rest of the fake library is built: a share of roms (--soundtrack-share,
default 8%) now get tagged audio files plus their track_meta rows, so the
music endpoints and the jukebox have something to read.

Two pre-existing bugs in that script surfaced while verifying this, both
of which made it fail outright on MariaDB:

- bulk_insert used executemany, whose MariaDB bulk path silently drops all
  but the first row when a column mixes NULL and non-NULL across the batch.
  Every rom batch inserted one rom, and the rom_files insert then failed the
  foreign key. Multi-VALUES statements per chunk keep the speed without it.
- with rows actually landing, the small title pools collide on the unique
  (platform_id, fs_name) index, so repeats are now disambiguated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-30 09:31:45 -04:00
..