From 71fd2eb0f803602024bb9140a9d81977d273020b Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 6 Jan 2022 21:03:31 -0800 Subject: [PATCH] SQLite storage: Implement missing function to empty the play queue --- Utils/SQLiteStore.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Utils/SQLiteStore.m b/Utils/SQLiteStore.m index 3d13c306b..7827da3a5 100644 --- a/Utils/SQLiteStore.m +++ b/Utils/SQLiteStore.m @@ -1923,6 +1923,18 @@ static SQLiteStore *g_sharedStore = NULL; return ret; } +- (void)queueEmpty +{ + sqlite3_stmt *st = stmt[stmt_remove_queue_all]; + + if (sqlite3_reset(st) || + sqlite3_step(st) != SQLITE_DONE || + sqlite3_reset(st)) + { + return; + } +} + - (int64_t)queueGetCount { sqlite3_stmt *st = stmt[stmt_count_queue];