fix(youtubedl): handle error when no url

This commit is contained in:
Ryan 2025-02-13 18:59:11 -05:00
parent 22249ecf7a
commit 4f7bd903b8
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -46,6 +46,8 @@ class YTDLSource(PCMVolumeTransformer):
if not data["entries"]:
raise Exception("no results found!")
data = data["entries"][0]
if "url" not in data:
raise Exception("no url returned!")
return cls(
TrackedAudioSource(