feat: try lipsinck
This commit is contained in:
@@ -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 })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user