Skip to content

Commit c99ae45

Browse files
committed
Fix stray output to stderr
1 parent 46b4f25 commit c99ae45

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

run.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"encoding/json"
2020
"fmt"
2121
"io"
22-
"log"
2322
"net/http"
2423
"os"
2524
"path/filepath"
@@ -141,16 +140,16 @@ func Run(ctx context.Context, transport *limiter.LimitTransport, config Config,
141140
}
142141

143142
if thumbReader != nil {
144-
log.Printf("Uploading thumbnail %q...\n", config.Thumbnail)
143+
fmt.Printf("Uploading thumbnail %q...\n", config.Thumbnail)
145144
_, err = service.Thumbnails.Set(video.Id).Media(thumbReader).Do()
146145
if err != nil {
147146
return fmt.Errorf("error making YouTube API call: %w", err)
148147
}
149-
fmt.Printf("Thumbnail uploaded!\n")
150148
}
151149

152150
// Insert caption
153151
if captionReader != nil {
152+
fmt.Printf("Uploading caption %q...\n", config.Caption)
154153
captionObj := &youtube.Caption{
155154
Snippet: &youtube.CaptionSnippet{},
156155
}
@@ -166,7 +165,6 @@ func Run(ctx context.Context, transport *limiter.LimitTransport, config Config,
166165
return fmt.Errorf("error inserting caption: %w", err)
167166
}
168167
}
169-
fmt.Printf("Caption uploaded!\n")
170168
}
171169

172170
plx := &Playlistx{}

0 commit comments

Comments
 (0)