Add only the track when a link carries both a video and a list
A link copied from an open mix (watch?v=…&list=RD…) expanded into the whole radio station — 500 entries from one paste. Any URL with a `v=` parameter now resolves to that single track, and only a /playlist?list=… URL expands. The rule is deliberately blunt rather than keyed on start_radio, so pasting a link behaves the same way every time. Playlist expansion is also capped separately from the queue limit (MAX_PLAYLIST_TRACKS, 100 by default) and the chat says when a playlist hit that ceiling. Verified against the real yt-dlp: both mix links resolve to one track, a plain video link to one, and a playlist URL to its 13 entries. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
ffcf88efb7
commit
6d65134f8e
@@ -49,6 +49,9 @@ YTDLP_PATH=yt-dlp
|
||||
|
||||
DEFAULT_VOLUME=60
|
||||
MAX_QUEUE_SIZE=500
|
||||
|
||||
# Сколько треков максимум добавит одна ссылка на плейлист или микс.
|
||||
MAX_PLAYLIST_TRACKS=100
|
||||
SEARCH_RESULT_LIMIT=10
|
||||
|
||||
# Через сколько секунд после ухода ПОСЛЕДНЕГО человека бот покидает голосовой
|
||||
|
||||
Reference in New Issue
Block a user