Skip to content

Commit

Permalink
Fix stray output to stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
porjo committed Oct 5, 2024
1 parent 46b4f25 commit c99ae45
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"os"
"path/filepath"
Expand Down Expand Up @@ -141,16 +140,16 @@ func Run(ctx context.Context, transport *limiter.LimitTransport, config Config,
}

if thumbReader != nil {
log.Printf("Uploading thumbnail %q...\n", config.Thumbnail)
fmt.Printf("Uploading thumbnail %q...\n", config.Thumbnail)
_, err = service.Thumbnails.Set(video.Id).Media(thumbReader).Do()
if err != nil {
return fmt.Errorf("error making YouTube API call: %w", err)
}
fmt.Printf("Thumbnail uploaded!\n")
}

// Insert caption
if captionReader != nil {
fmt.Printf("Uploading caption %q...\n", config.Caption)
captionObj := &youtube.Caption{
Snippet: &youtube.CaptionSnippet{},
}
Expand All @@ -166,7 +165,6 @@ func Run(ctx context.Context, transport *limiter.LimitTransport, config Config,
return fmt.Errorf("error inserting caption: %w", err)
}
}
fmt.Printf("Caption uploaded!\n")
}

plx := &Playlistx{}
Expand Down

0 comments on commit c99ae45

Please sign in to comment.