mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Land prototype on main (fix stacked-PR retarget gap)
PRs #10 and #11 were merged into their intermediate base branches (restructure/working-copy-root and proto-improvements) rather than main, because the stacked PRs' bases were not auto-retargeted (the branches were not deleted on merge). As a result main only received the #9 restructure and is still the plain working-copy bot. This brings the full prototype onto main as a clean delta on top of the current main tree (identical content to proto-improvements, but with main ancestry so it merges without the squash-induced rename/delete conflicts): - constants.py: env-var config, safe JSON loading, dependency guards, env->netrc tokens, API_SHARED_KEY + service_headers(), CONAN_* config - communication_subroutine.py: queue timeout/Empty, daemon threads, cooperative stop_event, inbound _authorize_request() - bot.py: asyncio event loop + load conanjurer_commands - music_functions / radio_commands / librarian_commands: X-Conjurer-Api-Key - conanjurer_commands/_functions: fixed + integrated bridge with RCON player-join notifications - requirements_bot.txt: aiomcrcon, asyncssh - conjurer_musician/.gitignore: keep runtime playlists/mp3 out of the repo Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+8
-1
@@ -8,7 +8,9 @@ import uuid
|
||||
|
||||
import asyncio
|
||||
from datetime import datetime
|
||||
from constants import RADIO_HARBOR_ADDRESS, SKIP_TRACK, FILE_SERVICE_ADDRESS, ADD_TO_PRIO_PLAYLIST, REQUEST_MUSIC, CREATE_PRIO_PLAYLIST, CLEAR_PRIO
|
||||
from constants import RADIO_HARBOR_ADDRESS, SKIP_TRACK, FILE_SERVICE_ADDRESS, ADD_TO_PRIO_PLAYLIST, REQUEST_MUSIC, CREATE_PRIO_PLAYLIST, CLEAR_PRIO, service_headers
|
||||
|
||||
SERVICE_HEADERS = service_headers()
|
||||
|
||||
class RadioModule(commands.Cog):
|
||||
def __init__(self, bot, logger_name):
|
||||
@@ -34,6 +36,7 @@ class RadioModule(commands.Cog):
|
||||
coroutine = asyncio.to_thread(
|
||||
requests.get,
|
||||
f"{RADIO_HARBOR_ADDRESS}{SKIP_TRACK}",
|
||||
headers=SERVICE_HEADERS,
|
||||
timeout=360,
|
||||
)
|
||||
result = await coroutine
|
||||
@@ -95,6 +98,7 @@ class RadioModule(commands.Cog):
|
||||
requests.post,
|
||||
f"{FILE_SERVICE_ADDRESS}{ADD_TO_PRIO_PLAYLIST}",
|
||||
json=jrequest,
|
||||
headers=SERVICE_HEADERS,
|
||||
timeout=360,
|
||||
)
|
||||
result = await coroutine
|
||||
@@ -130,6 +134,7 @@ class RadioModule(commands.Cog):
|
||||
requests.post,
|
||||
f"{FILE_SERVICE_ADDRESS}{REQUEST_MUSIC}",
|
||||
json=jrequest,
|
||||
headers=SERVICE_HEADERS,
|
||||
timeout=360,
|
||||
)
|
||||
result = await coroutine
|
||||
@@ -167,6 +172,7 @@ class RadioModule(commands.Cog):
|
||||
requests.post,
|
||||
f"{FILE_SERVICE_ADDRESS}{CREATE_PRIO_PLAYLIST}",
|
||||
json=jrequest,
|
||||
headers=SERVICE_HEADERS,
|
||||
timeout=360,
|
||||
)
|
||||
result = await coroutine
|
||||
@@ -194,6 +200,7 @@ class RadioModule(commands.Cog):
|
||||
coroutine = asyncio.to_thread(
|
||||
requests.get,
|
||||
f"{FILE_SERVICE_ADDRESS}{CLEAR_PRIO}",
|
||||
headers=SERVICE_HEADERS,
|
||||
timeout=360,
|
||||
)
|
||||
result = await coroutine
|
||||
|
||||
Reference in New Issue
Block a user