From 61226ed0e4595fe66e49f07b94d12891f800da0f Mon Sep 17 00:00:00 2001
From: Nic Wolfe <nic@wolfeden.ca>
Date: Fri, 28 Jan 2011 22:54:59 -0700
Subject: [PATCH] Added some logging to the image cache code

---
 sickbeard/image_cache.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/sickbeard/image_cache.py b/sickbeard/image_cache.py
index 091e77b13..49cd7c750 100644
--- a/sickbeard/image_cache.py
+++ b/sickbeard/image_cache.py
@@ -46,10 +46,14 @@ class ImageCache:
         return ek.ek(os.path.join, self._cache_dir(), banner_file_name)
 
     def has_poster(self, tvdb_id):
-        return ek.ek(os.path.isfile, self.poster_path(tvdb_id))
+        poster_path = self.poster_path(tvdb_id)
+        logger.log(u"Checking if file "+str(poster_path)+" exists", logger.DEBUG)
+        return ek.ek(os.path.isfile, poster_path)
 
     def has_banner(self, tvdb_id):
-        return ek.ek(os.path.isfile, self.banner_path(tvdb_id))
+        banner_path = self.banner_path(tvdb_id)
+        logger.log(u"Checking if file "+str(banner_path)+" exists", logger.DEBUG)
+        return ek.ek(os.path.isfile, banner_path)
 
     BANNER = 1
     POSTER = 2
@@ -117,6 +121,7 @@ class ImageCache:
                        }
 
         if not need_images[self.POSTER] and not need_images[self.BANNER]:
+            logger.log(u"No new cache images needed, not retrieving new ones")
             return
         
         # check the show dir for images and use them
-- 
GitLab