Repository: pymedusa/Medusa

Issue:
Censoring the number 0
After updating to the latest develop commit, it has started to censor the number `0`
```
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking database structure...main.db2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Initial Schema database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] InitialSchema upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Version To Tv Episodes database upgrade2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddVersionToTvEpisodes upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Default Ep Status To Tv Shows database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddDefaultEpStatusToTvShows upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Alter Shows Field Types database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AlterTVShowsFieldTypes upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Minor Version database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddMinorVersion upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Test Increase Major Version database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] TestIncreaseMajorVersion upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Proper Tags database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddProperTags upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Manual Searched database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddManualSearched upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Info Hash database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddInfoHash upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Plot database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddPlot upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Resource Size database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddResourceSize upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Indexer Mapping database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddPKIndexerMapping upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Indexer Integer database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddIndexerInteger upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking database structure...cache.db
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Initial Schema database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] InitialSchema upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Scene Exceptions database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddSceneExceptions upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Scene Name Cache database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddSceneNameCache upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Network Timezones database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddNetworkTimezones upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Last Search database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddLastSearch upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Scene Exceptions Seasons database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddSceneExceptionsSeasons upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Scene Exceptions Custom database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddSceneExceptionsCustom upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Scene Exceptions Refresh database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddSceneExceptionsRefresh upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Convert Scene Exeptions To Indexer Scheme database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] ConvertSceneExeptionsToIndexerScheme upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Convert Scene Names To Indexer Scheme database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] ConvertSceneNamesToIndexerScheme upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Remove Indexer Update Schema database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] RemoveIndexerUpdateSchema upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Checking Add Indexer Scene Exceptions database upgrade
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] AddIndexerSceneExceptions upgrade not required
2**********17-**********9-21 13:**********2:49 DEBUG    MAIN :: [4**********a598c] Performing a vacuum on the CACHE database
```

https://gist.github.com/duramato/62d1a19d24459ba14f70038ecbb0ba95


Discussion:

Resolving patch:
diff --git a/medusa/logger/__init__.py b/medusa/logger/__init__.py
--- a/medusa/logger/__init__.py
+++ b/medusa/logger/__init__.py
@@ -74,8 +74,10 @@ def rebuild_censored_list():
         if not value:
             continue
         if isinstance(value, collections.Iterable) and not isinstance(value, string_types):
-            results.update(value)
-        else:
+            for item in value:
+                if item and item != '0':
+                    results.add(item)
+        elif value and value != '0':
             results.add(value)
 
     # set of censored items and urlencoded counterparts


Test patch: