Fixed some bugs
This commit is contained in:
@@ -103,9 +103,7 @@ class A_ZLyrics(LyricsPlatform):
|
||||
data = artist + ' ' * (title != '' and artist != '') + title
|
||||
encoded_data = quote(data.replace(' ', '+'))
|
||||
|
||||
|
||||
google_page = await self.get('{}{}+site%3Aazlyrics.com'.format(
|
||||
'https://duckduckgo.com/html/?q=', encoded_data))
|
||||
google_page = await self.get('{}{}+site%3Aazlyrics.com'.format('https://duckduckgo.com/html/?q=', encoded_data))
|
||||
|
||||
try:
|
||||
results = re.findall(r'(azlyrics\.com\/lyrics\/[a-z0-9]+\/(\w+).html)', google_page)
|
||||
|
||||
@@ -76,7 +76,7 @@ class Back(ControlButton):
|
||||
if len(self.player.previous_votes) >= (required := self.player.required()):
|
||||
pass
|
||||
else:
|
||||
return await self.send(interaction, "backVote".format(interaction.user, len(self.player.previous_votes), required))
|
||||
return await self.send(interaction, "backVote", interaction.user, len(self.player.previous_votes), required)
|
||||
|
||||
if not self.player.is_playing:
|
||||
self.player.queue.backto(1)
|
||||
|
||||
@@ -438,26 +438,17 @@ class Node:
|
||||
data: dict = await response.json()
|
||||
|
||||
try:
|
||||
track: dict = data["tracks"][0]
|
||||
info: dict = track.get("info")
|
||||
track: dict = data["data"]
|
||||
except:
|
||||
raise TrackLoadError("Not able to find the provided track.")
|
||||
|
||||
return [
|
||||
Track(
|
||||
track_id=None,
|
||||
info={
|
||||
"title": discord_url.group("file"),
|
||||
"author": "Unknown",
|
||||
"length": info.get("length"),
|
||||
"uri": info.get("uri"),
|
||||
"position": info.get("position"),
|
||||
"identifier": info.get("identifier")
|
||||
},
|
||||
track_id=track["encoded"],
|
||||
info=track["info"],
|
||||
requester=requester
|
||||
)
|
||||
]
|
||||
|
||||
else:
|
||||
async with self._session.get(
|
||||
url=f"{self._rest_uri}/" + NODE_VERSION + f"/loadtracks?identifier={quote(query)}",
|
||||
|
||||
Reference in New Issue
Block a user