优化名称编辑弹窗

This commit is contained in:
DelLevin-Home
2026-08-12 19:35:14 +08:00
parent 67612edadf
commit f682eb017e
9 changed files with 432 additions and 100 deletions

View File

@@ -1457,6 +1457,11 @@ class AppProvider extends ChangeNotifier {
final trimmed = name.trim();
if (trimmed.isEmpty || !seen.add(trimmed)) continue;
final person = await findOrCreate(trimmed, occupationLabel);
// 演员角色:若该影视已存在该人物的配音关联,则跳过添加演员关联
if (roleType == 'actor' &&
await _moviePersonDao.existsRelation(movie.id, person.id, 'voiceActor')) {
continue;
}
if (!await _moviePersonDao.existsRelation(movie.id, person.id, roleType)) {
await _moviePersonDao.insert(MoviePerson(
id: uuid.v4(),