From 9d5b2da19ee6aebd50cb2931e8da0f60dbfcf5da Mon Sep 17 00:00:00 2001 From: echel0n Date: Mon, 30 Jun 2014 02:23:32 -0700 Subject: [PATCH] Testing fix to help reduce memory footprint. --- SickBeard.py | 12 ++++++------ sickbeard/__init__.py | 18 +++++++++--------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/SickBeard.py b/SickBeard.py index 1242ae88..2671f382 100755 --- a/SickBeard.py +++ b/SickBeard.py @@ -23,6 +23,7 @@ import functools import sys import shutil +from sickbeard.exceptions import MultipleShowObjectsException if sys.version_info < (2, 6): print "Sorry, requires Python 2.6 or 2.7." @@ -84,6 +85,8 @@ def loadShowsFromDB(): Populates the showList with shows from the database """ + logger.log(u"Loading initial show list") + myDB = db.DBConnection() sqlResults = myDB.select("SELECT * FROM tv_shows") @@ -329,18 +332,12 @@ def main(): # Initialize the config and our threads sickbeard.initialize(consoleLogging=consoleLogging) - sickbeard.showList = [] - if sickbeard.DAEMON: daemonize() # Use this PID for everything sickbeard.PID = os.getpid() - # Build from the DB to start with - logger.log(u"Loading initial show list") - loadShowsFromDB() - if forcedPort: logger.log(u"Forcing web server to port " + str(forcedPort)) startPort = forcedPort @@ -387,6 +384,9 @@ def main(): sys.exit() def startup(): + # Build from the DB to start with + loadShowsFromDB() + # Fire up all our threads sickbeard.start() diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index ba7828fb..cb03674b 100644 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -90,10 +90,10 @@ traktCheckerScheduler = None showList = None loadingShowList = None -providerList = [] -newznabProviderList = [] -torrentRssProviderList = [] -metadata_provider_dict = {} +providerList = None +newznabProviderList = None +torrentRssProviderList = None +metadata_provider_dict = None NEWEST_VERSION = None NEWEST_VERSION_STRING = None @@ -161,7 +161,7 @@ INDEXER_DEFAULT = None INDEXER_TIMEOUT = None SCENE_DEFAULT = None ANIME_DEFAULT = None -PROVIDER_ORDER = [] +PROVIDER_ORDER = None NAMING_MULTI_EP = None NAMING_PATTERN = None @@ -413,17 +413,17 @@ TIME_PRESET_W_SECONDS = None TIMEZONE_DISPLAY = None USE_SUBTITLES = False -SUBTITLES_LANGUAGES = [] +SUBTITLES_LANGUAGES = None SUBTITLES_DIR = '' -SUBTITLES_SERVICES_LIST = [] -SUBTITLES_SERVICES_ENABLED = [] +SUBTITLES_SERVICES_LIST = None +SUBTITLES_SERVICES_ENABLED = None SUBTITLES_HISTORY = False SUBTITLES_FINDER_FREQUENCY = 1 USE_FAILED_DOWNLOADS = False DELETE_FAILED = False -EXTRA_SCRIPTS = [] +EXTRA_SCRIPTS = None GIT_PATH = None