Merge pull request 'Discord: several radio streams per voice channel; adding never overwrites (#213)' (#227) from fix/213-multi-stream-per-channel into main
Build & Deploy / Build & push images (push) Successful in 4m13s
Build & Deploy / Deploy Firestore rules & indexes (push) Successful in 28s
Build & Deploy / Deploy to VM (push) Successful in 1m49s
Build & Deploy / Report a failed deploy (push) Skipped

This commit was merged in pull request #227.
This commit is contained in:
2026-10-05 01:44:35 -04:00
15 changed files with 924 additions and 114 deletions
+7 -2
View File
@@ -76,6 +76,9 @@ export const c2api = {
method: "PUT",
body: JSON.stringify(body),
}),
/** Without stream_id: ADD a stream to the voice channel (a channel can carry
* several, each its own bot + system; never replaces one). With stream_id:
* restart / edit that stream. */
startDiscordStream: (body: {
guild_id: string;
channel_id: string;
@@ -83,6 +86,7 @@ export const c2api = {
mode: "persistent" | "adhoc";
channel_name?: string;
preferred_token_id?: string;
stream_id?: string;
}) => request<DiscordStream>("/discord/streams", { method: "POST", body: JSON.stringify(body) }),
/** Permanently remove a radio channel (stopped through desired state first). Admin only. */
deleteDiscordStream: (streamId: string) =>
@@ -99,10 +103,11 @@ export const c2api = {
}>(`/discord/guilds/${encodeURIComponent(guildId)}?leave_radio_bots=${leaveRadioBots ? "true" : "false"}`, {
method: "DELETE",
}),
stopDiscordStream: (guildId: string, channelId: string) =>
/** Stop ONE stream (its voice channel may carry others, which keep playing). */
stopDiscordStream: (guildId: string, streamId: string) =>
request<{ stopped: string[] }>(`/discord/guilds/${encodeURIComponent(guildId)}/stop`, {
method: "POST",
body: JSON.stringify({ channel_id: channelId, reason: "stopped from web admin" }),
body: JSON.stringify({ stream_id: streamId, reason: "stopped from web admin" }),
}),
// Node approval