gotta fix fucking imports
This commit is contained in:
@@ -26,11 +26,11 @@ session.proxies = proxies
|
||||
|
||||
class Musify(AudioSource):
|
||||
@classmethod
|
||||
def fetch_source(cls, row: dict) -> str | None:
|
||||
super().fetch_source(row)
|
||||
def fetch_source(cls, song: dict) -> str | None:
|
||||
super().fetch_source(song)
|
||||
|
||||
title = row.title
|
||||
artists = row.get_artist_names()
|
||||
title = song.title
|
||||
artists = song.get_artist_names()
|
||||
|
||||
# trying to get a download link via the autocomplete api
|
||||
for artist in artists:
|
||||
@@ -73,9 +73,9 @@ class Musify(AudioSource):
|
||||
return None
|
||||
if r.status_code == 200:
|
||||
autocomplete = r.json()
|
||||
for row in autocomplete:
|
||||
if artist in row['label'] and "/track" in row['url']:
|
||||
return cls.get_download_link(row['url'])
|
||||
for song in autocomplete:
|
||||
if artist in song['label'] and "/track" in song['url']:
|
||||
return cls.get_download_link(song['url'])
|
||||
|
||||
return None
|
||||
|
||||
|
||||
@@ -19,5 +19,5 @@ class AudioSource:
|
||||
logger.info(f"try getting source {row['title']} from {cls.__name__}")
|
||||
|
||||
@classmethod
|
||||
def fetch_audio(cls, song: song_objects.Song, src: song_objects.Sourcet):
|
||||
def fetch_audio(cls, song: song_objects.Song, src: song_objects.Source):
|
||||
logger.info(f"downloading {song}: {cls.__name__} {src.url} -> {song.target.file}")
|
||||
|
||||
Reference in New Issue
Block a user