forked from Hay1tsme/artemis
Added function for pulling a song via the DB unique ID instead of the native song ID
This commit is contained in:
parent
043ff17008
commit
b42e8ab76c
@ -453,6 +453,15 @@ class ChuniStaticData(BaseData):
|
|||||||
return None
|
return None
|
||||||
return result.fetchone()
|
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(
|
def put_avatar(
|
||||||
self,
|
self,
|
||||||
version: int,
|
version: int,
|
||||||
@ -587,4 +596,4 @@ class ChuniStaticData(BaseData):
|
|||||||
result = self.execute(sql)
|
result = self.execute(sql)
|
||||||
if result is None:
|
if result is None:
|
||||||
return None
|
return None
|
||||||
return result.fetchone()
|
return result.fetchone()
|
Loading…
Reference in New Issue
Block a user