Only search YouTube when enabled
This commit is contained in:
parent
e73db927c1
commit
8b231a1b54
@ -6,6 +6,8 @@ from lavalink import (
|
|||||||
PlaylistInfo,
|
PlaylistInfo,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from utils.config import YOUTUBE_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
class LoadError(
|
class LoadError(
|
||||||
Exception
|
Exception
|
||||||
@ -32,6 +34,7 @@ class CustomAudioTrack(DeferredAudioTrack):
|
|||||||
LoadType.EMPTY,
|
LoadType.EMPTY,
|
||||||
LoadType.ERROR,
|
LoadType.ERROR,
|
||||||
):
|
):
|
||||||
|
if YOUTUBE_SUPPORT:
|
||||||
ytmsearch = f"ytmsearch:{self.title} {self.author}"
|
ytmsearch = f"ytmsearch:{self.title} {self.author}"
|
||||||
results = await client.get_tracks(ytmsearch)
|
results = await client.get_tracks(ytmsearch)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user