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
@@ -12,6 +12,7 @@ const modlog = require("./lib/modlog.js");
|
||||
const retention = require("./lib/retention.js");
|
||||
const colours = require("./lib/colours.js");
|
||||
const customItems = require("./lib/customitems.js");
|
||||
const customMusic = require("./lib/custommusic.js");
|
||||
const config = require("./config.js");
|
||||
const defpacks = require("./lib/defpacks.js");
|
||||
const http = require("./lib/http.js");
|
||||
@@ -41,6 +42,7 @@ const main = async () => {
|
||||
accounts.startBackups();
|
||||
colours.load();
|
||||
customItems.load();
|
||||
customMusic.load();
|
||||
reports.load();
|
||||
support.load();
|
||||
bans.load();
|
||||
|
||||
Reference in new issue
Block a user