add more validation

This commit is contained in:
2026-01-11 14:21:12 +01:00
parent 1b45f4c8da
commit 4eed9adaad
2 changed files with 31 additions and 2 deletions
+4
View File
@@ -83,6 +83,10 @@ async fn add_game(
game.title = game.title.trim().to_string();
if game.remote_id == 0 {
return None;
}
if let Some(existing) = games.iter().find(|g| {
g.title == game.title || (g.remote_id == game.remote_id && g.source == game.source)
}) {