mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-23 11:13:51 -05:00
[3.2.3][Audio] Correct an unsupported LoadType (#3337)
* Limit Playlists Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com> * logging improvements Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com> * logging improvements Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com> * sigh Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com> * chore Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
This commit is contained in:
@@ -755,6 +755,8 @@ class MusicCache:
|
||||
if val and not forced and isinstance(val, dict):
|
||||
data = val
|
||||
data["query"] = query
|
||||
if data.get("loadType") == "V2_COMPACT":
|
||||
data["loadType"] = "V2_COMPAT"
|
||||
results = LoadResult(data)
|
||||
called_api = False
|
||||
if results.has_error:
|
||||
@@ -863,6 +865,8 @@ class MusicCache:
|
||||
|
||||
if recently_played:
|
||||
track = random.choice(recently_played)
|
||||
if track.get("loadType") == "V2_COMPACT":
|
||||
track["loadType"] = "V2_COMPAT"
|
||||
results = LoadResult(track)
|
||||
tracks = list(results.tracks)
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user