add more validation
This commit is contained in:
@@ -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)
|
||||
}) {
|
||||
|
||||
Reference in New Issue
Block a user