diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3dfe9d5240096ffba1775d88d5fbcfbfde7cb791..d3f8fed9189b0c430ebe6c83fe99f95bc5ff2b41 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ image: docker:19.03.12 variables: DOCKER_TLS_CERTDIR: "/certs" - IMAGE_VER: 2.0.0 + IMAGE_VER: 2.0.1 services: - docker:19.03.12-dind diff --git a/lib/PiTube/Controller/Nginx.pm b/lib/PiTube/Controller/Nginx.pm index c31cb29d8472b5bfe80160e78273991c13230072..fe24a15bf17f0c1abe9664a8a3b42bc24ac00483 100644 --- a/lib/PiTube/Controller/Nginx.pm +++ b/lib/PiTube/Controller/Nginx.pm @@ -68,27 +68,34 @@ sub callback_recorder($c) { $c->render( status => 404, text => '' ), return if ! $stream; # aktualizace stavu streamu - $stream->update({ - recording => 'f', - }); - - my $record = $stream->records( - { - end => undef, - path => undef, - }, - { - order_by => {'-desc' => 'begin'} - } - )->first; +# $stream->update({ +# recording => 'f', +# }); +# +# my $record = $stream->records( +# { +# end => undef, +# path => undef, +# }, +# { +# order_by => {'-desc' => 'begin'} +# } +# )->first; +# +# if ( $record ) { +# $record->update({ +# path => $c->param('path'), +# recorder => $c->param('recorder'), +# end => \'now()', +# }); +# } - if ( $record ) { - $record->update({ - path => $c->param('path'), - recorder => $c->param('recorder'), - end => \'now()', - }); - } + $stream->add_to_records({ + publish_user_id => $stream->publish_user_id, + path => $c->param('path'), + recorder => $c->param('recorder'), + end => \'now()', + }); $c->render( status => 204, text => '' ); }