diff options
author | dakkar <dakkar@thenautilus.net> | 2021-12-31 16:24:27 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2021-12-31 16:24:27 +0000 |
commit | f0042c548660476f728af7f79eb74c890d45b787 (patch) | |
tree | 67b2b2e3fda73c5e1bdb796c525b7f439d60ef40 /lib/App/MediaControl/Web.rakumod | |
parent | actually pass pairs (diff) | |
download | media-control-f0042c548660476f728af7f79eb74c890d45b787.tar.gz media-control-f0042c548660476f728af7f79eb74c890d45b787.tar.bz2 media-control-f0042c548660476f728af7f79eb74c890d45b787.zip |
recent (broken)
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 { |