mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
feat(music): staff upload MP3s as den music tracks
A "Music" page in both panels: an MP3 (MPEG layer III frames, 4 KB to 15 MB) becomes a den music track at once, with no restart. - lib/custommusic.js: a custom den item made from "Jam On" (614) with a new `audio` column, the file's version. Its abbrName is CustomMusic<id>_<version>, which the content handler answers from data/custom-music/<id>-<version>.mp3, so a new upload is a new name and no game plays an old copy from its cache. - games get it by "xdi" with no client change; players from the item finder, or the shop when staff tick "on sale". - deleting it takes it from every inventory and removes the file. - /mod/api/music and /admin/api/music: list, play, upload (name, cost, inShop in the query), delete; 30 uploads an hour per staff member; "music uploaded"/"music deleted" in the mod log. - new permission music.upload, on the Admin role by default; a role list the admin has changed needs it ticked. The panels' CSP allows media-src 'self' for the preview players. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
a77a1bcfb4
commit
2344270291
9 files changed
+517
-8
No files matched your search
+1
-1
@@ -600,7 +600,7 @@ const PAGE_HEADERS = {
|
||||
"X-Frame-Options": "DENY",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"Referrer-Policy": "no-referrer",
|
||||
"Content-Security-Policy": "default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; connect-src 'self'; img-src 'self' data:; font-src 'self'; "
|
||||
"Content-Security-Policy": "default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; connect-src 'self'; img-src 'self' data:; media-src 'self'; font-src 'self'; "
|
||||
+ "form-action 'none'; frame-ancestors 'none'; base-uri 'none'",
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user