From 02dbb3222712eb575be080c7503bc7b01e731214 Mon Sep 17 00:00:00 2001
From: xnappo <cnappi@gmail.com>
Date: Sat, 2 May 2015 15:34:55 -0500
Subject: [PATCH] Minor fix for TV shows progress

Count was wrong due to empty shows.
---
 resources/lib/LibrarySync.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/resources/lib/LibrarySync.py b/resources/lib/LibrarySync.py
index 37f43533..4d67237e 100644
--- a/resources/lib/LibrarySync.py
+++ b/resources/lib/LibrarySync.py
@@ -220,14 +220,14 @@ class LibrarySync():
                 if (self.ShouldStop()):
                     return False
                 
+                if(pDialog != None):
+                    progressTitle = "Processing " + view.get('title') + " (" + str(count) + " of " + str(total) + ")"
+                    pDialog.update(0, "Emby for Kodi - Running Sync", progressTitle)
+                    count += 1                   
+
                 if item.get('IsFolder') and item.get('RecursiveItemCount') != 0:                   
                     allEmbyTvShowIds.append(item["Id"])
                     
-                    if(pDialog != None):
-                        progressTitle = "Processing " + view.get('title') + " (" + str(count) + " of " + str(total) + ")"
-                        pDialog.update(0, "Emby for Kodi - Running Sync", progressTitle)
-                        count += 1        
-                    
                     #build a list with all Id's and get the existing entry (if exists) in Kodi DB
                     kodiShow = None
                     for kodishow in allKodiTvShows: