X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=remoteglot.pl;h=c8beaa463d5c58f3ae21f7b884c44257cb4d8d83;hp=11c5d4166e4c7ce95427f48d499d328c7d241207;hb=5736a183e629bedf79f56962a57bf90dd493d967;hpb=260a30a0f85011e878d9cd0b98fb5a47fee85613 diff --git a/remoteglot.pl b/remoteglot.pl index 11c5d41..c8beaa4 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -291,7 +291,11 @@ sub handle_pgn { } $pgn->parse_game({ save_comments => 'yes' }); - my $pos = Position->start_pos($pgn->white, $pgn->black); + my $white = $pgn->white; + my $black = $pgn->black; + $white =~ s/,.*//; # Remove first name. + $black =~ s/,.*//; # Remove first name. + my $pos = Position->start_pos($white, $black); my $moves = $pgn->moves; my @uci_moves = (); my @repretty_moves = (); @@ -929,7 +933,9 @@ sub output_json { push @games, { id => $ref->{'id'}, name => "$white–$black", - url => $ref->{'url'} + url => $ref->{'url'}, + hashurl => $ref->{'hash_url'}, + score => $other_game_json->{'score'} }; }; if ($@) {