Let a soundtrack have alternative names (e.g. "FF7", "Final Fantasy VII", "ファイナルファンタジーVII"), so searching finds it by any of them and the cover search has better titles to try.
Plan
Migration. Add alternative_names TEXT[] NOT NULL DEFAULT '{}' to soundtrack. A separate soundtrack_alias table is also possible if names need their own data, but an array is enough for search. Update the sqlc queries.
Endpoint.PUT /api/v1/soundtracks/{uuid}/alternative-names with {"names": [...]} replaces the list. It trims and deduplicates the names and drops any that equal the soundtrack name. Needs a token like the other write endpoints.
Responses. Include alternative_names in the soundtrack, statistics (/statistics/...soundtracks) and soundtrack list responses. Update openapi.json, so the client's generated types (tools/generate_api_types.gd) pick it up.
Search.
SearchCache and /find match alternative names too.
Results still show the real soundtrack name, with the name that matched, so the user sees why it matched.
Sync.
A sync must keep the names when a soundtrack is re-added or renamed (matched by hash).
ResetDB drops them like everything else.
Cover search. Try the alternative names when fetching covers (cover art issue #12).
Used by
MusicPlayer: an edit button in the soundtrack statistics popup, and search in the app, Sansan/MusicPlayer#49.
Let a soundtrack have alternative names (e.g. "FF7", "Final Fantasy VII", "ファイナルファンタジーVII"), so searching finds it by any of them and the cover search has better titles to try.
## Plan
- **Migration.** Add `alternative_names TEXT[] NOT NULL DEFAULT '{}'` to `soundtrack`. A separate `soundtrack_alias` table is also possible if names need their own data, but an array is enough for search. Update the sqlc queries.
- **Endpoint.** `PUT /api/v1/soundtracks/{uuid}/alternative-names` with `{"names": [...]}` replaces the list. It trims and deduplicates the names and drops any that equal the soundtrack name. Needs a token like the other write endpoints.
- **Responses.** Include `alternative_names` in the soundtrack, statistics (`/statistics/...soundtracks`) and soundtrack list responses. Update `openapi.json`, so the client's generated types (`tools/generate_api_types.gd`) pick it up.
- **Search.**
- `SearchCache` and `/find` match alternative names too.
- Results still show the real soundtrack name, with the name that matched, so the user sees why it matched.
- **Sync.**
- A sync must keep the names when a soundtrack is re-added or renamed (matched by hash).
- `ResetDB` drops them like everything else.
- **Cover search.** Try the alternative names when fetching covers (cover art issue #12).
## Used by
- MusicPlayer: an edit button in the soundtrack statistics popup, and search in the app, Sansan/MusicPlayer#49.
Sansan
added the feature label 2026-10-09 16:04:07 +02:00
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.
Let a soundtrack have alternative names (e.g. "FF7", "Final Fantasy VII", "ファイナルファンタジーVII"), so searching finds it by any of them and the cover search has better titles to try.
Plan
alternative_names TEXT[] NOT NULL DEFAULT '{}'tosoundtrack. A separatesoundtrack_aliastable is also possible if names need their own data, but an array is enough for search. Update the sqlc queries.PUT /api/v1/soundtracks/{uuid}/alternative-nameswith{"names": [...]}replaces the list. It trims and deduplicates the names and drops any that equal the soundtrack name. Needs a token like the other write endpoints.alternative_namesin the soundtrack, statistics (/statistics/...soundtracks) and soundtrack list responses. Updateopenapi.json, so the client's generated types (tools/generate_api_types.gd) pick it up.SearchCacheand/findmatch alternative names too.ResetDBdrops them like everything else.Used by