Skip to content

Commit 76def7e

Browse files
committed
Fix playlist find when just trying to download a single video
1 parent 61c9142 commit 76def7e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pybalt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from .misc.tracker import tracker
1212
from .misc.tracker import get_tracker
1313

14-
VERSION = "2025.5.7"
14+
VERSION = "2025.5.8"
1515

1616
# Initialize tracker
1717
tracker = get_tracker()

pybalt/core/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,10 @@ def detect_playlist(self, url: str) -> List[str]:
14771477
# Check if it's a playlist
14781478
playlist_id_match = re.findall(r"[&?]list=([^&]+)", url)
14791479
if playlist_id_match:
1480+
# Check if this is just a video link with a playlist ID
1481+
if "?v=" in url:
1482+
return [url]
1483+
14801484
logger.debug(f"Detected YouTube playlist ID: {playlist_id_match[0]}")
14811485
try:
14821486
from pytube import Playlist

0 commit comments

Comments
 (0)