From 291967610a4e71340ae1b2fb2667bacf297ee50d Mon Sep 17 00:00:00 2001 From: Tony Blyler Date: Fri, 13 May 2016 18:32:04 -0400 Subject: [PATCH] Add some logging for added initial files --- queue/queue.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/queue/queue.go b/queue/queue.go index 08f5b1e..ee1acdd 100644 --- a/queue/queue.go +++ b/queue/queue.go @@ -297,12 +297,14 @@ func (q *Queue) Run(stop <-chan bool) { } for _, file := range files { - if file.IsDir() { + // skip directories or files that do not end with .torrent + if file.IsDir() || !strings.HasSuffix(file.Name(), ".torrent") { continue } fullPath := filepath.Join(localPath, file.Name()) + q.logger.Printf("Adding %s to download queue", fullPath) err = q.addTorrentFilePath(fullPath) if err != nil { q.logger.Printf("Failed to add torrent at '%s' error '%s'", fullPath, err)