summary history branches tags files
commit:ba61b410619db824e752678523d129cacb0fe51b
author:Trevor Bentley
committer:Trevor Bentley
date:Sun Aug 6 15:01:26 2017 +0200
parents:aa96568e6d1234aead58e5818cad11f99060ea61
Test alarms
diff --git a/src/main.rs b/src/main.rs
line changes: +14/-0
index ad6b8c0..cee5317
--- a/src/main.rs
+++ b/src/main.rs
@@ -16,6 +16,10 @@ extern crate fruitbasket;
 use fruitbasket::FruitApp;
 use fruitbasket::FruitError;
 
+extern crate timer;
+extern crate chrono;
+use chrono::offset::utc::UTC;
+
 extern crate ctrlc;
 use std::sync::atomic::{AtomicBool, Ordering};
 use std::sync::Arc;
@@ -931,6 +935,16 @@ fn main() {
     let mut touchbar = TouchbarUI::init(tx);
     info!("Created touchbar.");
 
+    spotify.schedule_alarm(connectr::AlarmEntry {
+        time: "18:34".to_string(),
+        repeat: connectr::AlarmRepeat::Daily,
+        context: connectr::PlayContext::new()
+            .context_uri("spotify:user:mrmekon:playlist:2NZx9rQlpDTEhjrbCIwh0Q")
+            .offset_position(0)
+            .build(),
+        device: "adf47bd71923ad681f33e3a778c56fc33f4a63a8".to_string(),
+    });
+
     let mut tiny: Option<process::Child> = None;
     if let Some(wine_dir) = find_wine_path() {
         info!("Found wine root: {:?}", wine_dir);