Skip to content

Commit

Permalink
more details of failed file size
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Mar 29, 2022
1 parent 134e6a1 commit a23ca77
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/youtube/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ func (s *Service) RSSFeed(fi FeedInfo) (string, error) {

var fileSize int
if fileInfo, fiErr := os.Stat(entry.File); fiErr != nil {
log.Printf("[WARN] failed to get file size for %s: %v", entry.File, fiErr)
log.Printf("[WARN] failed to get file size for %s (%s %s): %v",
entry.File, entry.VideoID, entry.Title, fiErr)
} else {
fileSize = int(fileInfo.Size())
}
Expand Down Expand Up @@ -261,7 +262,7 @@ func (s *Service) removeOld(fi FeedInfo) (int, error) {
}
for _, f := range files {
if e := os.Remove(f); e != nil {
log.Printf("[WARN] failed to remove file %s: %s", f, e)
log.Printf("[WARN] failed to remove file %s: %v", f, e)
continue
}
removed++
Expand Down

0 comments on commit a23ca77

Please sign in to comment.