diff options
Diffstat (limited to 'lib/App/MediaControl/Web.rakumod')
-rw-r--r-- | lib/App/MediaControl/Web.rakumod | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/App/MediaControl/Web.rakumod b/lib/App/MediaControl/Web.rakumod index 076e2f2..b6fd85d 100644 --- a/lib/App/MediaControl/Web.rakumod +++ b/lib/App/MediaControl/Web.rakumod @@ -21,6 +21,7 @@ class App::MediaControl::Web { await self.vlc.play-file(|%( $file<path name>:p # no comma! )); + self.db.mark-entry-watched($id); } post -> 'pause' { await self.vlc.command('pl_pause') } post -> 'stop' { await self.vlc.command('pl_stop') } @@ -46,6 +47,9 @@ class App::MediaControl::Web { }; content 'application/json', %reply; } + get -> 'recent' { + content 'application/json', self.db.get-recently-watched-folders(); + } }; my $application = route { |