Skip to content

Commit

Permalink
fix: Fix YouTube service trying to be created when the API key is not…
Browse files Browse the repository at this point in the history
… set
  • Loading branch information
gabe565 committed Aug 28, 2023
1 parent 873e269 commit aaa94c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ func run(cmd *cobra.Command, args []string) (err error) {
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM, syscall.SIGQUIT)
defer cancel()

if err := youtube.CreateService(ctx); err != nil {
return err
if config.Default.YouTubeAPIKey != "" {
if err := youtube.CreateService(ctx); err != nil {
return err
}
}

entries, err := device.BeginDiscover(ctx)
Expand Down

0 comments on commit aaa94c2

Please sign in to comment.