Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide transcripts with no user actions #365

Open
curiousdannii opened this issue Jul 6, 2022 · 0 comments
Open

Hide transcripts with no user actions #365

curiousdannii opened this issue Jul 6, 2022 · 0 comments

Comments

@curiousdannii
Copy link
Member

curiousdannii commented Jul 6, 2022

The way the transcript recording system works is that it initiates a transcript with the initial game text before the user does anything. This means that someone who opens an entry creates a useless transcript. The system needs to keep that transcript beginning in case the user does go on to do stuff, but it shouldn't be presented to the author yet.

Transcript sessions should be filtered so that only those with more than one entry are displayed to the author. The number of "commands" also needs to subtract 1.

I think the filtering should take place here:

sub transcript_list : Chained('fetch_entry') : PathPart('transcript') :
Args(0) {
my ( $self, $c ) = @_;
my $session_rs = $c->model('IFCompDB::Transcript')->search(
{ entry => $c->stash->{entry}->id, },
{ select => [
'session',
{ max => 'inputcount', -as => 'command_count' },
{ min => 'timestamp', -as => 'start_time' },
],
as => [qw( session_id command_count start_time )],
group_by => 'session',
order_by => 'start_time',
},
);
$c->stash->{session_rs} = $session_rs;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant