Update #10

Merged
PacketParker merged 26 commits from dev into main 2024-12-03 00:05:14 -06:00
Showing only changes of commit 0d3bb6732e - Show all commits

View File

@ -98,14 +98,15 @@ class SpotifySource(Source):
) )
async def load_album(self, user, metadata): async def load_album(self, user, metadata):
try:
artwork_url = metadata["images"][0]["url"]
except IndexError:
artwork_url = None
tracks = [] tracks = []
for track in metadata["tracks"][ for track in metadata["tracks"][
"items" "items"
]: # Loop through each track in the album. ]: # Loop through each track in the album.
try:
artwork_url = track["album"]["images"][0]["url"]
except IndexError:
artwork_url = None
tracks.append( tracks.append(
CustomAudioTrack( CustomAudioTrack(
{ # Create an instance of our CustomAudioTrack. { # Create an instance of our CustomAudioTrack.