continued

This commit is contained in:
Lars Noack 2022-11-21 15:54:13 +01:00
parent 889423518e
commit fe1c849852
2 changed files with 4 additions and 2 deletions

View File

@ -27,8 +27,8 @@ class Musify(AudioSource):
def fetch_source(cls, row: dict) -> str | None:
super().fetch_source(row)
title = row['title']
artists = row['artists']
title = row.title
artists = row.get_artist_names()
# trying to get a download link via the autocomplete api
for artist in artists:

View File

@ -17,7 +17,9 @@ class Song:
def __init__(self, json_response) -> None:
self.json_data = json_response
self.title = self.json_data['title']
self.artists = [Artist(a) for a in self.json_data['artists']]
self.sources = []
for src in self.json_data['source']:
if src['src'] is None: