From fe1c849852c2725b120d99f84fe32f229eb1249e Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Mon, 21 Nov 2022 15:54:13 +0100 Subject: [PATCH] continued --- src/music_kraken/audio_source/sources/musify.py | 4 ++-- src/music_kraken/database/song.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/music_kraken/audio_source/sources/musify.py b/src/music_kraken/audio_source/sources/musify.py index 6709c43..57dd395 100644 --- a/src/music_kraken/audio_source/sources/musify.py +++ b/src/music_kraken/audio_source/sources/musify.py @@ -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: diff --git a/src/music_kraken/database/song.py b/src/music_kraken/database/song.py index 2d88acd..62df16f 100644 --- a/src/music_kraken/database/song.py +++ b/src/music_kraken/database/song.py @@ -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: