swingmusic/app/models/lastfm.py
mungai-njoroge f5de09bd09 add last fm similar artists to db table
+ add db methods for the above
+ try and discard last fm store
2023-07-01 01:39:39 +03:00

14 lines
291 B
Python

from dataclasses import dataclass
@dataclass
class SimilarArtist:
artisthash: str
similar_artist_hashes: str
def get_artist_hash_set(self) -> set[str]:
"""
Returns a set of similar artists.
"""
return set(self.similar_artist_hashes.split("~"))