Queue Mode, Bass Boost, Position Saving, and Cache Split#138
Open
nunotfc wants to merge 12 commits into
Open
Conversation
• It is now possible to chain multiple commands using the | separator in a single message. • Example: "t | v 30" shows the playback time and sets the volume to 30. • The processing splits the message by |, executes each command sequentially, and sends the responses. • Tip added to the help: Tip: use "|" to chain commands (e.g., "t | v 30"). • Improved error handling: when a command fails before its name is identified, an “unknown command” message is shown instead of a generic error. Fixes • Logger: added force=True to logging.basicConfig() to ensure the logging configuration is applied even if it was previously initialized. This fixes the issue where logs were not being written to the file even with log: true in the config.
- New command: pi (pitch) - Adjust playback pitch from -12 to +12 semitones - Refactored audio filters to combine bass boost and pitch in single af string - MoveUsersCommand (go): now allows users outside bot's channel to move users - MoveUsersCommand: fixed Python version check from <= (3,10,10) to < (3,11) - Docker: added curl, unzip; installed Deno runtime; fixed apt cache path - Docker: copy tviplayer.py custom extractor to yt-dlp (python3.11 path) - Updated requirements: httpx, deno, yt-dlp-ejs, yt-dlp>=2024.0.dev0
New command /update (or /upd): - Check for package updates from requirements.txt via pip - Show updated packages with versions (e.g., yt-dlp 2024.1.1 -> 2024.2.1) - Automatically restart bot if updates are available - Communication via private message Performance optimizations: - CPU: loop_timeout 0.01s -> 0.1s (~90% reduction) - RAM: YouTube search 300 -> 50 results (~83% reduction) - RAM: Fixed memory leak in get_raw() - RAM: Queue limited to 1000 items (FIFO) - RAM: Track_list limited to 1000 items - RAM: Fixed maxlen bug in recents - CPU: YoutubeDL reused (single instance) MPV buffer: - Adjusted to 5 seconds (cache_secs=5) for all streams - No back buffer (demuxer_max_back_bytes=0) - Fixes live streams falling behind issue Initialization fixes (TeamTalk): - Fixed race condition on startup - Bot now waits for channel join before processing commands - 30 second timeout for joining channel - Improved connection debug logs - Better error handling for login/join channel Modified files: bot/app_vars.py, bot/cache.py, bot/commands/__init__.py, bot/commands/admin_commands.py, bot/commands/user_commands.py, bot/player/__init__.py, bot/player/track.py, bot/services/yt.py, bot/__init__.py, bot/TeamTalk/__init__.py, bot/TeamTalk/thread.py
New changes for the bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces queue-based playback, optional resume positions, a new bass boost control, cache storage split into multiple files, and several new commands/settings. It also includes fixes for YouTube search compatibility and improved status metadata handling, and chained commands.
Key Features
Commands Added/Changed
User commands:
Admin commands:
Playback/Player Changes
Config and Migrations
Cache Storage Changes
Status/Metadata
Service Updates
Tools
Files Added
Notes/Behavioral Changes
Chained Commands
It is now possible to chain multiple commands using the | separator in a single message.
Example: "t | v 30" shows the playback time and sets the volume to 30.
The processing splits the message by |, executes each command sequentially, and sends the responses.
Testing