FEAT: AUTOPLAY MODE #91

This commit is contained in:
Terry Geng
2020-03-06 16:15:04 +08:00
parent 665edec684
commit e70727cfd1
4 changed files with 50 additions and 7 deletions

View File

@ -177,6 +177,13 @@ class MusicDatabase:
conn.commit()
conn.close()
def query_all_ids(self):
conn = sqlite3.connect(self.db_path)
cursor = conn.cursor()
results = cursor.execute("SELECT id FROM music").fetchall()
conn.close()
return list(map(lambda i: i[0], results))
def query_music(self, **kwargs):
condition = []
filler = []