From dba3388567818cb5c60be9d406d3e1cccc84b3ea Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 29 Apr 2026 14:22:03 +0200 Subject: Refactor database connections and add integration tests - Use context managers for sqlite3 connections in cron, vclogs, and database utils - Add URL helper utility for yt-dlp with clean_url_for_ytdlp function - Add slow integration test markers and new integration test files - Fix test imports to use conftest directly instead of tests.conftest - Improve downloader error handling and use COPYPARTY_URL_UPLOAD env var - Update pytest.ini with slow test markers and warning filters - Document slow test usage in AGENTS.md --- cogs/music/play_commands.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cogs/music/play_commands.py') diff --git a/cogs/music/play_commands.py b/cogs/music/play_commands.py index c53dbc7..bdb021d 100644 --- a/cogs/music/play_commands.py +++ b/cogs/music/play_commands.py @@ -19,6 +19,7 @@ from discord.ext import commands from cogs.music import audio_playback, media_processing from cogs.utils.file_search import UniversalSearcher from cogs.utils.settings import get_uploadurl +from cogs.utils.url_helper import clean_url_for_ytdlp logger = logging.getLogger(__name__) @@ -193,6 +194,7 @@ class PlayCommands(commands.Cog): } loop = asyncio.get_event_loop() + url = clean_url_for_ytdlp(url) with YoutubeDL(ytdl_opts) as ydl: info_dict = await loop.run_in_executor( None, lambda: ydl.extract_info(url, download=True) -- cgit v1.2.3