about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/watch/events.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/watch/events.rs b/src/watch/events.rs
index df414ff..9ba26cd 100644
--- a/src/watch/events.rs
+++ b/src/watch/events.rs
@@ -148,7 +148,7 @@ impl MpvEventHandler {
                     return Ok(true);
                 }
                 EndFileReason::Error => {
-                    unreachable!("This have raised a separate error")
+                    unreachable!("This will be raised as a separate error")
                 }
                 EndFileReason::Redirect => {
                     todo!("We probably need to handle this somehow");
@@ -226,6 +226,15 @@ impl MpvEventHandler {
                         mpv.execute("write-watch-later-config", &[])?;
                         mpv.execute("playlist-remove", &["current"])?;
                     }
+                    &["yt-mark-done-and-go-next"] => {
+                        self.mark_cvideo_inactive(app).await?;
+                        self.mark_cvideo_watched(app).await?;
+
+                        mpv.execute("playlist-remove", &["current"])?;
+                    }
+                    &["yt-check-new-videos"] => {
+                        self.possibly_add_new_videos(app, mpv).await?;
+                    }
                     other => {
                         debug!("Unknown message: {}", other.join(" "))
                     }