1
0
Fork 0

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
1 changed files with 10 additions and 1 deletions

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()