Persist selections and compile song output
This commit is contained in:
@@ -156,9 +156,12 @@ struct FinalReviewView: View {
|
||||
|
||||
private func ensureSunoOutput() {
|
||||
guard project.sunoOutput == nil else { return }
|
||||
let compiledOutput = (try? SongProjectPromptCompiler().compile(project: project))
|
||||
?? CompiledSunoOutput(lyricsText: project.lyrics.text, stylePrompt: "")
|
||||
|
||||
project.sunoOutput = SunoOutput(
|
||||
lyricsText: project.lyrics.text,
|
||||
stylePrompt: "",
|
||||
lyricsText: compiledOutput.lyricsText,
|
||||
stylePrompt: compiledOutput.stylePrompt,
|
||||
generatedAt: Date()
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user