From 57737c05fbf7c482ba436ca8001e7a4b3097b434 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 24 Sep 2026 01:52:51 +0200 Subject: refactor(node): move the Music handlers out of webrtc_server MusicMixin in transport/webrtc/apps/music.py: tags and cover art, and the audio transcode with the extension list that gates it. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-node/tests/test_audio_transcode.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/meshbay-node/tests') diff --git a/packages/meshbay-node/tests/test_audio_transcode.py b/packages/meshbay-node/tests/test_audio_transcode.py index acb39b7..941ada2 100644 --- a/packages/meshbay-node/tests/test_audio_transcode.py +++ b/packages/meshbay-node/tests/test_audio_transcode.py @@ -20,6 +20,7 @@ from meshbay_common.webcrypto import chunk_key_aes, decrypt_chunk_aes from meshbay_node.indexer.group_index import GroupIndex from meshbay_node.media_cache import MediaCache from meshbay_node.transport import webrtc_server as wrs +from meshbay_node.transport.webrtc.apps import music from meshbay_node.transport.webrtc_server import WebRTCPeerSession from conftest import needs_subprocess, one_root @@ -123,13 +124,13 @@ async def test_second_request_reuses_the_cached_transcode(tmp_path, media_cache, session, file_id = _session(tmp_path, clip, gek, media_cache) calls = {"n": 0} - real = wrs._transcode_audio_to_aac + real = music._transcode_audio_to_aac async def counting(path): calls["n"] += 1 return await real(path) - monkeypatch.setattr(wrs, "_transcode_audio_to_aac", counting) + monkeypatch.setattr(music, "_transcode_audio_to_aac", counting) await session._do_audio_transcode_request({"file_id": file_id}) session.sent.clear() -- cgit v1.2.3