mirror of
https://gitea.tendokyu.moe/Hay1tsme/artemis.git
synced 2026-02-04 22:57:32 +08:00
Added function for pulling a song via the DB unique ID instead of the native song ID
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user