diff --git a/CHANGES.md b/CHANGES.md
index 5522af15..e004fb46 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -27,6 +27,7 @@
* Change database code to PEP8 standards
* Change general config's branches and pull request list generation for faster page loading
* Add PlayStation Network logo
+* Change IMDb updater to a toggleable option under General Settings (disabled by default due to slow operations)
[develop changelog]
* Fix traceback error when using the menu item Manage/Update Kodi
diff --git a/gui/slick/interfaces/default/config_general.tmpl b/gui/slick/interfaces/default/config_general.tmpl
index 79d2356d..07ea2717 100644
--- a/gui/slick/interfaces/default/config_general.tmpl
+++ b/gui/slick/interfaces/default/config_general.tmpl
@@ -132,6 +132,16 @@
+
+
+ Enable IMDb info
+
+
+ fetches show rating and country flag (does slow show updating process)
+
+
+
+
Show root directories
diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py
index 4fec4f21..0a308050 100755
--- a/sickbeard/__init__.py
+++ b/sickbeard/__init__.py
@@ -172,6 +172,7 @@ INDEXER_DEFAULT = None
INDEXER_TIMEOUT = None
SCENE_DEFAULT = False
ANIME_DEFAULT = False
+USE_IMDB = False
PROVIDER_ORDER = []
NAMING_MULTI_EP = False
@@ -522,7 +523,7 @@ def initialize(consoleLogging=True):
AUTOPOSTPROCESSER_FREQUENCY, DEFAULT_AUTOPOSTPROCESSER_FREQUENCY, MIN_AUTOPOSTPROCESSER_FREQUENCY, \
ANIME_DEFAULT, NAMING_ANIME, ANIMESUPPORT, USE_ANIDB, ANIDB_USERNAME, ANIDB_PASSWORD, ANIDB_USE_MYLIST, \
ANIME_SPLIT_HOME, SCENE_DEFAULT, BACKLOG_DAYS, ANIME_TREAT_AS_HDTV, \
- COOKIE_SECRET
+ COOKIE_SECRET, USE_IMDB
if __INITIALIZED__:
return False
@@ -659,6 +660,7 @@ def initialize(consoleLogging=True):
INDEXER_TIMEOUT = check_setting_int(CFG, 'General', 'indexer_timeout', 20)
ANIME_DEFAULT = bool(check_setting_int(CFG, 'General', 'anime_default', 0))
SCENE_DEFAULT = bool(check_setting_int(CFG, 'General', 'scene_default', 0))
+ USE_IMDB = bool(check_setting_int(CFG, 'General', 'use_imdb', 0))
PROVIDER_ORDER = check_setting_str(CFG, 'General', 'provider_order', '').split()
@@ -1443,6 +1445,7 @@ def save_config():
new_config['General']['indexer_timeout'] = int(INDEXER_TIMEOUT)
new_config['General']['anime_default'] = int(ANIME_DEFAULT)
new_config['General']['scene_default'] = int(SCENE_DEFAULT)
+ new_config['General']['use_imdb'] = int(USE_IMDB)
new_config['General']['provider_order'] = ' '.join(PROVIDER_ORDER)
new_config['General']['version_notify'] = int(VERSION_NOTIFY)
new_config['General']['auto_update'] = int(AUTO_UPDATE)
diff --git a/sickbeard/show_queue.py b/sickbeard/show_queue.py
index 393dc838..ba033eb2 100644
--- a/sickbeard/show_queue.py
+++ b/sickbeard/show_queue.py
@@ -336,14 +336,15 @@ class QueueItemAdd(ShowQueueItem):
self._finishEarly()
raise
- logger.log(u"Retrieving show info from IMDb", logger.DEBUG)
- try:
- self.show.loadIMDbInfo()
- except imdb_exceptions.IMDbError, e:
- #todo Insert UI notification
- logger.log(u"Something is wrong with IMDb api: " + ex(e), logger.WARNING)
- except Exception, e:
- logger.log(u"Error loading IMDb info: " + ex(e), logger.ERROR)
+ if sickbeard.USE_IMDB:
+ logger.log(u'Retrieving show info from IMDb', logger.DEBUG)
+ try:
+ self.show.loadIMDbInfo()
+ except imdb_exceptions.IMDbError, e:
+ #todo Insert UI notification
+ logger.log(u'Something is wrong with IMDb api: ' + ex(e), logger.WARNING)
+ except Exception, e:
+ logger.log(u'Error loading IMDb info: ' + ex(e), logger.ERROR)
try:
self.show.saveToDB()
@@ -520,14 +521,15 @@ class QueueItemUpdate(ShowQueueItem):
self.show.indexer).name + " was incomplete, aborting: " + ex(e), logger.ERROR)
return
- logger.log(u"Retrieving show info from IMDb", logger.DEBUG)
- try:
- self.show.loadIMDbInfo()
- except imdb_exceptions.IMDbError, e:
- logger.log(u"Something is wrong with IMDb api: " + ex(e), logger.WARNING)
- except Exception, e:
- logger.log(u"Error loading IMDb info: " + ex(e), logger.ERROR)
- logger.log(traceback.format_exc(), logger.DEBUG)
+ if sickbeard.USE_IMDB:
+ logger.log(u'Retrieving show info from IMDb', logger.DEBUG)
+ try:
+ self.show.loadIMDbInfo()
+ except imdb_exceptions.IMDbError, e:
+ logger.log(u'Something is wrong with IMDb api: ' + ex(e), logger.WARNING)
+ except Exception, e:
+ logger.log(u'Error loading IMDb info: ' + ex(e), logger.ERROR)
+ logger.log(traceback.format_exc(), logger.DEBUG)
try:
self.show.saveToDB()
diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py
index 7d3da4e6..381c475d 100644
--- a/sickbeard/webserve.py
+++ b/sickbeard/webserve.py
@@ -3356,7 +3356,7 @@ class ConfigGeneral(Config):
handle_reverse_proxy=None, home_search_focus=None, sort_article=None, auto_update=None, notify_on_update=None,
proxy_setting=None, proxy_indexers=None, anon_redirect=None, git_path=None, git_remote=None, calendar_unprotected=None,
fuzzy_dating=None, trim_zero=None, date_preset=None, date_preset_na=None, time_preset=None,
- indexer_timeout=None, rootDir=None, theme_name=None, default_home=None):
+ indexer_timeout=None, use_imdb=None, rootDir=None, theme_name=None, default_home=None):
results = []
@@ -3412,6 +3412,9 @@ class ConfigGeneral(Config):
if indexer_timeout:
sickbeard.INDEXER_TIMEOUT = config.to_int(indexer_timeout)
+ if use_imdb:
+ sickbeard.USE_IMDB = config.checkbox_to_value(use_imdb)
+
if time_preset:
sickbeard.TIME_PRESET_W_SECONDS = time_preset
sickbeard.TIME_PRESET = sickbeard.TIME_PRESET_W_SECONDS.replace(u':%S', u'')