Added function for pulling a song via the DB unique ID instead of the native song ID

This commit is contained in:
EmmyHeart 2023-07-11 09:16:11 +00:00
parent 043ff17008
commit b42e8ab76c

View File

@ -453,6 +453,15 @@ class ChuniStaticData(BaseData):
return None
return result.fetchone()
def get_song(self, music_id: int) -> Optional[Row]:
sql = music.select(music.c.id == music_id)
result = self.execute(sql)
if result is None:
return None
return result.fetchone()
def put_avatar(
self,
version: int,
@ -587,4 +596,4 @@ class ChuniStaticData(BaseData):
result = self.execute(sql)
if result is None:
return None
return result.fetchone()
return result.fetchone()