X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=remoteglot.pl;h=39a0f4ba805f4312f6a12afe69be7757a6ed0384;hp=6fc0e8972b9483983e5177cdb3988ce2c75aa4a2;hb=77b62690312c008e5dc2c76bac2f5ac85ecd393d;hpb=ddad3efdbef2da6f410449a114511cdc6897b067 diff --git a/remoteglot.pl b/remoteglot.pl index 6fc0e89..39a0f4b 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -741,9 +741,9 @@ sub output_json { my $encoded = JSON::XS::encode_json($json); atomic_set_contents($remoteglotconf::json_output, $encoded); - if (exists($pos_calculating->{'history'}) && + if (exists($pos_calculating->{'pretty_history'}) && defined($remoteglotconf::json_history_dir)) { - my $halfmove_num = scalar @{$pos_calculating->{'history'}}; + my $halfmove_num = scalar @{$pos_calculating->{'pretty_history'}}; (my $fen = $pos_calculating->fen()) =~ tr,/ ,-_,; my $filename = $remoteglotconf::json_history_dir . "/move$halfmove_num-$fen.json";