diff --git a/VERSION b/VERSION index 53adb84..a7ee35a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.2 +1.8.3 diff --git a/config/triggers.json b/config/triggers.json index 2e58ff4..10553b9 100644 --- a/config/triggers.json +++ b/config/triggers.json @@ -3,6 +3,6 @@ {"names": ["!tuturulist"], "sound": ["Tutturuu_v1.wav", "Tutturuu_v1.wav"]}, { "names": ["!china"], - "sound": ["china1.mp3", "china2.mp3"] + "sound": ["china1.mp3", "china 2.mp3"] } ] diff --git a/sounds/china2.mp3 b/sounds/china 2.mp3 similarity index 100% rename from sounds/china2.mp3 rename to sounds/china 2.mp3 diff --git a/src/torchlight/Commands.py b/src/torchlight/Commands.py index 0d7a38a..fc293aa 100644 --- a/src/torchlight/Commands.py +++ b/src/torchlight/Commands.py @@ -8,6 +8,7 @@ import sys import tempfile import traceback +from pathlib import Path from re import Match, Pattern from typing import Any @@ -624,7 +625,7 @@ async def _func(self, message: list[str], player: Player) -> int: sound, ) ) - audio_clip = self.audio_manager.AudioClip(player, "file://" + sound_path) + audio_clip = self.audio_manager.AudioClip(player, Path(sound_path).absolute().as_uri()) if not audio_clip: return 1 @@ -883,7 +884,7 @@ async def Say(self, player: Player, language: str, tld: str, message: str) -> in google_text_to_speech.write_to_fp(temp_file) temp_file.close() - audio_clip = self.audio_manager.AudioClip(player, "file://" + temp_file.name) + audio_clip = self.audio_manager.AudioClip(player, Path(temp_file.name).absolute().as_uri()) if not audio_clip: os.unlink(temp_file.name) return 1 @@ -947,7 +948,7 @@ async def Say(self, player: Player, message: str) -> int: ) await subprocess.communicate(message.encode("utf-8", errors="ignore")) - audio_clip = self.audio_manager.AudioClip(player, "file://" + temp_file.name) + audio_clip = self.audio_manager.AudioClip(player, Path(temp_file.name).absolute().as_uri()) if not audio_clip: os.unlink(temp_file.name) return 1 diff --git a/src/torchlight/FFmpegAudioPlayer.py b/src/torchlight/FFmpegAudioPlayer.py index a2c25ce..3f7ff0d 100644 --- a/src/torchlight/FFmpegAudioPlayer.py +++ b/src/torchlight/FFmpegAudioPlayer.py @@ -262,7 +262,6 @@ async def _stream_subprocess(self, curl_command: list[str], ffmpeg_command: list self.curl_process = await asyncio.create_subprocess_exec( *curl_command, stdout=asyncio.subprocess.PIPE, - stderr=asyncio.subprocess.DEVNULL, ) self.ffmpeg_process = await asyncio.create_subprocess_exec(