Enforce user locks for AI updates

This commit is contained in:
diyaa
2026-09-13 21:20:57 +02:00
parent a39bdbe6fc
commit ae88c6e533
15 changed files with 507 additions and 59 deletions
@@ -52,22 +52,24 @@ public final class AutoSongProjectDecisionsDirector: Sendable {
private func automaticScopes(for project: SongProject) -> [SongProjectUpdateScope] {
var scopes: [SongProjectUpdateScope] = []
if project.isStructureAutomatic {
if project.isStructureAutomatic && !project.isUpdateScopeLocked(.structure) {
scopes.append(.structure)
}
if project.instruments.contains(where: { $0.selected && $0.autoArrangementEnabled }) {
if !project.isUpdateScopeLocked(.arrangement) &&
project.instruments.contains(where: { $0.selected && $0.autoArrangementEnabled }) {
scopes.append(.arrangement)
}
if project.bpm?.mode != .manual ||
if !project.isUpdateScopeLocked(.musicalParameters) &&
(project.bpm?.mode != .manual ||
project.key?.mode != .manual ||
project.scale?.mode != .manual ||
project.maqam?.mode != .manual {
project.maqam?.mode != .manual) {
scopes.append(.musicalParameters)
}
if project.isProductionAutomatic {
if project.isProductionAutomatic && !project.isUpdateScopeLocked(.productionDirections) {
scopes.append(.productionDirections)
}