feat: align with upstream 1.5.9.9

This commit is contained in:
2026-09-12 18:21:11 +08:00
commit 34f0679117
805 changed files with 376275 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import { db } from '~/drizzle/db'
import { scheduleSongPool, songs } from '~/drizzle/schema'
import { eq, count } from 'drizzle-orm'
// 返回备选池有效记录数(innerJoin 排除歌曲已删除的孤立记录)
export const fetchPoolCount = async () => {
const result = await db
.select({ count: count() })
.from(scheduleSongPool)
.innerJoin(songs, eq(scheduleSongPool.songId, songs.id))
.limit(1)
return result[0]?.count || 0
}