]> git.sesse.net Git - remoteglot/blobdiff - remoteglot.pl
Make it possible for the hash probes to reconcile multiple sources.
[remoteglot] / remoteglot.pl
index 287909f8d8a63590c5cd1f9d0e028470495259bf..b466d4dc2721c48126f0253ec3f6838e318c40f1 100755 (executable)
@@ -929,7 +929,8 @@ sub output_json {
                                push @games, {
                                        id => $ref->{'id'},
                                        name => "$white–$black",
-                                       url => $ref->{'url'}
+                                       url => $ref->{'url'},
+                                       hashurl => $ref->{'hash_url'},
                                };
                        };
                        if ($@) {
@@ -972,7 +973,7 @@ sub output_json {
                                $dbh->do('INSERT INTO scores (id, score_type, score_value, engine, depth, nodes) VALUES (?,?,?,?,?,?) ' .
                                         '    ON CONFLICT (id) DO UPDATE SET ' .
                                         '        score_type=EXCLUDED.score_type, ' .
-                                        '        score_value=EXCLUDED.score_vlaue, ' .
+                                        '        score_value=EXCLUDED.score_value, ' .
                                         '        engine=EXCLUDED.engine, ' .
                                         '        depth=EXCLUDED.depth, ' .
                                         '        nodes=EXCLUDED.nodes',