diff options
Diffstat (limited to 'lib/App/MediaControl')
-rw-r--r-- | lib/App/MediaControl/Web.rakumod | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/App/MediaControl/Web.rakumod b/lib/App/MediaControl/Web.rakumod index c577d90..cb12783 100644 --- a/lib/App/MediaControl/Web.rakumod +++ b/lib/App/MediaControl/Web.rakumod @@ -15,6 +15,12 @@ class App::MediaControl::Web { method start() { my $vlc = route { post -> 'play' { await self.vlc.command('pl_play') } + post -> 'play', Int:D $id { + my $file = self.db.get-entry($id); + await self.vlc.play-file(|%( + $file<path name>:p # no comma! + )); + } post -> 'pause' { await self.vlc.command('pl_pause') } post -> 'stop' { await self.vlc.command('pl_stop') } |