From 5708f479a27db3d5c9c2ed6bc5e622bf5cbfc0c7 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 18 Nov 2018 11:23:00 +0100 Subject: [PATCH] Add start url field --- _meta/beat.yml | 1 + config/config.go | 6 ++++-- youtubebeat.reference.yml | 1 + youtubebeat.yml | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/_meta/beat.yml b/_meta/beat.yml index 93a41f8..2619358 100644 --- a/_meta/beat.yml +++ b/_meta/beat.yml @@ -5,3 +5,4 @@ youtubebeat: # Defines how often an event is sent to the output period: 1s + start_url: "https://www.youtube.com/watch?v=SmBCZgcGlKk" diff --git a/config/config.go b/config/config.go index a4ad302..41f9583 100644 --- a/config/config.go +++ b/config/config.go @@ -6,9 +6,11 @@ package config import "time" type Config struct { - Period time.Duration `config:"period"` + Period time.Duration `config:"period"` + StartUrl string `config:"start_url"` } var DefaultConfig = Config{ - Period: 1 * time.Second, + Period: 1 * time.Second, + StartUrl: "https://www.youtube.com/watch?v=SmBCZgcGlKk", } diff --git a/youtubebeat.reference.yml b/youtubebeat.reference.yml index 6b3a1c5..2e653f2 100644 --- a/youtubebeat.reference.yml +++ b/youtubebeat.reference.yml @@ -5,6 +5,7 @@ youtubebeat: # Defines how often an event is sent to the output period: 1s + start_url: "https://www.youtube.com/watch?v=SmBCZgcGlKk" #================================ General ====================================== diff --git a/youtubebeat.yml b/youtubebeat.yml index 5a9af49..6e1bd0b 100644 --- a/youtubebeat.yml +++ b/youtubebeat.yml @@ -5,6 +5,7 @@ youtubebeat: # Defines how often an event is sent to the output period: 1s + start_url: "https://www.youtube.com/watch?v=SmBCZgcGlKk" #================================ General =====================================