Skip to content
Snippets Groups Projects
Verified Commit 322251ba authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Prechod na stream.is_live v databazi

parent d80a398a
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,8 @@ sub list { ...@@ -25,6 +25,8 @@ sub list {
] ]
}; };
$cond->{is_live} = 't' if $c->param('live');
my $streams = $c->schema->resultset('Stream_view')->search( my $streams = $c->schema->resultset('Stream_view')->search(
$cond, $cond,
{ order_by => 'name' } { order_by => 'name' }
...@@ -37,13 +39,8 @@ sub list { ...@@ -37,13 +39,8 @@ sub list {
my $rights = $c->session->{user}{acl}{ $stream->key }; my $rights = $c->session->{user}{acl}{ $stream->key };
if ( $c->param('live') ) {
next STREAM if ! $stream->is_live;
}
my %stream = ( my %stream = (
$stream->get_columns(), $stream->get_columns(),
is_live => $stream->is_live,
is_writeable => $stream->is_writeable( $rights ), is_writeable => $stream->is_writeable( $rights ),
is_recordable => $stream->is_recordable( $c->session->{user}{id} ), is_recordable => $stream->is_recordable( $c->session->{user}{id} ),
); );
...@@ -116,7 +113,6 @@ sub info { ...@@ -116,7 +113,6 @@ sub info {
$c->stash->{stream} = { $c->stash->{stream} = {
$stream->get_columns(), $stream->get_columns(),
is_live => $stream->is_live,
is_writeable => $stream->is_writeable( $rights ), is_writeable => $stream->is_writeable( $rights ),
is_recordable => $stream->is_recordable( $c->session->{user}{id} ), is_recordable => $stream->is_recordable( $c->session->{user}{id} ),
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment