diff --git a/README.md b/README.md index e80a691..3e02c2c 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ python3 -m venv venv venv/bin/pip install wheel venv/bin/pip install -r requirements.txt (cd web && npm install && npm run build) -./scripts/translate_templates.py --lang-dir lang/ --template-dir templates/ +venv/bin/python3 ./scripts/translate_templates.py --lang-dir lang/ --template-dir templates/ ``` diff --git a/mumbleBot.py b/mumbleBot.py index 2a2cb3c..e6f5e57 100644 --- a/mumbleBot.py +++ b/mumbleBot.py @@ -24,10 +24,10 @@ from packaging import version import util import command import constants +import media.playlist from constants import tr_cli as tr from database import SettingsDatabase, MusicDatabase, DatabaseMigration from media.item import ValidationFailedError, PreparationFailedError -from media.playlist import BasePlaylist from media.cache import MusicCache @@ -385,7 +385,7 @@ class MumbleBot: ffmpeg_debug = "warning" channels = 2 if self.stereo else 1 - self.pcm_buffer_size = 960*channels + self.pcm_buffer_size = 960 * channels command = ("ffmpeg", '-v', ffmpeg_debug, '-nostdin', '-i', uri, '-ss', f"{start_from:f}", '-ac', str(channels), '-f', 's16le', '-ar', '48000', '-') @@ -591,7 +591,7 @@ class MumbleBot: + self.volume_helper.ducking_volume_set else: self.volume_helper.real_volume = self.volume_helper.volume_set - \ - (self.volume_helper.volume_set - self.volume_helper.real_volume) * math.exp(- delta / 0.5) + (self.volume_helper.volume_set - self.volume_helper.real_volume) * math.exp(- delta / 0.5) self.last_volume_cycle_time = time.time() @@ -615,7 +615,7 @@ class MumbleBot: pcm_data = bytearray(_pcm_data) if stereo: if not fadein: - mask = [math.exp(-x/60) for x in range(0, int(len(pcm_data) / 4))] + mask = [math.exp(-x / 60) for x in range(0, int(len(pcm_data) / 4))] else: mask = [math.exp(-x / 60) for x in reversed(range(0, int(len(pcm_data) / 4)))] @@ -625,7 +625,7 @@ class MumbleBot: pcm_data[4 * i + 2:4 * i + 4] = struct.pack("