Skip to content

Commit

Permalink
Merge pull request #1 from r-novel/feature/rylio#86
Browse files Browse the repository at this point in the history
refs rylio#86; update cmd utility;
  • Loading branch information
welat09 authored Apr 11, 2020
2 parents e979337 + 4fc2721 commit 3fe014b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/ytdl/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"context"
"fmt"
"io"
"net/http"
Expand All @@ -10,7 +11,7 @@ import (

"encoding/json"

"github.com/mattn/go-isatty"
isatty "github.com/mattn/go-isatty"
"github.com/olekukonko/tablewriter"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
Expand Down Expand Up @@ -168,7 +169,7 @@ func handler(identifier string, options options) {
log.Info().Msg("Fetching video info...")
//fmt.Print("\u001b[0G")
//fmt.Print("\u001b[2K")
info, err := client.GetVideoInfo(identifier)
info, err := client.GetVideoInfo(context.Background(), identifier)
if err != nil {
err = fmt.Errorf("Unable to fetch video info: %w", err)
return
Expand Down Expand Up @@ -245,7 +246,7 @@ func handler(identifier string, options options) {
return
}
format := formats[0]
downloadURL, err := client.GetDownloadURL(info, format)
downloadURL, err := client.GetDownloadURL(context.Background(), info, format)
if err != nil {
err = fmt.Errorf("Unable to get download url: %w", err)
return
Expand Down

0 comments on commit 3fe014b

Please sign in to comment.