feat: try lipsinck

This commit is contained in:
2026-09-03 11:06:08 +02:00
parent 99431f9ae4
commit 7521f5939f
9 changed files with 196 additions and 88 deletions
+6 -1
View File
@@ -39,7 +39,12 @@ exports.onProjectWritten = onDocumentWritten(PROJECT_FUNCTION_OPTIONS, async (pr
} else if (!beforeData) {
//song create
} else {
if (!beforeData?.songUrl && afterData?.songUrl) {
const selectedSongChanged =
!!afterData?.songUrl &&
(beforeData?.songUrl !== afterData.songUrl ||
beforeData?.sunoAudioId !== afterData?.sunoAudioId)
if (selectedSongChanged) {
await getSunoTimestamps(projectId)
await refList.projects.doc(projectId).update({ hasSong: true })
}