mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Merge branch 'feature/ToggleImdb' into develop
This commit is contained in:
commit
d5fb963b73
5 changed files with 37 additions and 18 deletions
|
@ -32,6 +32,7 @@
|
||||||
* Fix Recent Search running status on Manage Searches page
|
* Fix Recent Search running status on Manage Searches page
|
||||||
* Change to no longer require restart with the "Scan and post process" option on page config/Post Processing
|
* Change to no longer require restart with the "Scan and post process" option on page config/Post Processing
|
||||||
* Add validation when using Release Group token on page config Post Processing/Episode Naming/Name pattern/Custom
|
* Add validation when using Release Group token on page config Post Processing/Episode Naming/Name pattern/Custom
|
||||||
|
* Change IMDb updater to a toggleable option under General Settings (disabled by default due to slow operations)
|
||||||
|
|
||||||
[develop changelog]
|
[develop changelog]
|
||||||
* Fix traceback error when using the menu item Manage/Update Kodi
|
* Fix traceback error when using the menu item Manage/Update Kodi
|
||||||
|
|
|
@ -132,6 +132,16 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
<label for="use_imdb">
|
||||||
|
<span class="component-title">Enable IMDb info</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input type="checkbox" name="use_imdb" id="use_imdb" #if $sickbeard.USE_IMDB then 'checked="checked"' else ''#>
|
||||||
|
<p>fetches show rating and country flag (does slow show updating process)</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="field-pair">
|
<div class="field-pair">
|
||||||
<label>
|
<label>
|
||||||
<span class="component-title">Show root directories</span>
|
<span class="component-title">Show root directories</span>
|
||||||
|
|
|
@ -172,6 +172,7 @@ INDEXER_DEFAULT = None
|
||||||
INDEXER_TIMEOUT = None
|
INDEXER_TIMEOUT = None
|
||||||
SCENE_DEFAULT = False
|
SCENE_DEFAULT = False
|
||||||
ANIME_DEFAULT = False
|
ANIME_DEFAULT = False
|
||||||
|
USE_IMDB = False
|
||||||
PROVIDER_ORDER = []
|
PROVIDER_ORDER = []
|
||||||
|
|
||||||
NAMING_MULTI_EP = False
|
NAMING_MULTI_EP = False
|
||||||
|
@ -522,7 +523,7 @@ def initialize(consoleLogging=True):
|
||||||
AUTOPOSTPROCESSER_FREQUENCY, DEFAULT_AUTOPOSTPROCESSER_FREQUENCY, MIN_AUTOPOSTPROCESSER_FREQUENCY, \
|
AUTOPOSTPROCESSER_FREQUENCY, DEFAULT_AUTOPOSTPROCESSER_FREQUENCY, MIN_AUTOPOSTPROCESSER_FREQUENCY, \
|
||||||
ANIME_DEFAULT, NAMING_ANIME, ANIMESUPPORT, USE_ANIDB, ANIDB_USERNAME, ANIDB_PASSWORD, ANIDB_USE_MYLIST, \
|
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, \
|
ANIME_SPLIT_HOME, SCENE_DEFAULT, BACKLOG_DAYS, ANIME_TREAT_AS_HDTV, \
|
||||||
COOKIE_SECRET
|
COOKIE_SECRET, USE_IMDB
|
||||||
|
|
||||||
if __INITIALIZED__:
|
if __INITIALIZED__:
|
||||||
return False
|
return False
|
||||||
|
@ -659,6 +660,7 @@ def initialize(consoleLogging=True):
|
||||||
INDEXER_TIMEOUT = check_setting_int(CFG, 'General', 'indexer_timeout', 20)
|
INDEXER_TIMEOUT = check_setting_int(CFG, 'General', 'indexer_timeout', 20)
|
||||||
ANIME_DEFAULT = bool(check_setting_int(CFG, 'General', 'anime_default', 0))
|
ANIME_DEFAULT = bool(check_setting_int(CFG, 'General', 'anime_default', 0))
|
||||||
SCENE_DEFAULT = bool(check_setting_int(CFG, 'General', 'scene_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()
|
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']['indexer_timeout'] = int(INDEXER_TIMEOUT)
|
||||||
new_config['General']['anime_default'] = int(ANIME_DEFAULT)
|
new_config['General']['anime_default'] = int(ANIME_DEFAULT)
|
||||||
new_config['General']['scene_default'] = int(SCENE_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']['provider_order'] = ' '.join(PROVIDER_ORDER)
|
||||||
new_config['General']['version_notify'] = int(VERSION_NOTIFY)
|
new_config['General']['version_notify'] = int(VERSION_NOTIFY)
|
||||||
new_config['General']['auto_update'] = int(AUTO_UPDATE)
|
new_config['General']['auto_update'] = int(AUTO_UPDATE)
|
||||||
|
|
|
@ -336,14 +336,15 @@ class QueueItemAdd(ShowQueueItem):
|
||||||
self._finishEarly()
|
self._finishEarly()
|
||||||
raise
|
raise
|
||||||
|
|
||||||
logger.log(u"Retrieving show info from IMDb", logger.DEBUG)
|
if sickbeard.USE_IMDB:
|
||||||
try:
|
logger.log(u'Retrieving show info from IMDb', logger.DEBUG)
|
||||||
self.show.loadIMDbInfo()
|
try:
|
||||||
except imdb_exceptions.IMDbError, e:
|
self.show.loadIMDbInfo()
|
||||||
#todo Insert UI notification
|
except imdb_exceptions.IMDbError, e:
|
||||||
logger.log(u"Something is wrong with IMDb api: " + ex(e), logger.WARNING)
|
#todo Insert UI notification
|
||||||
except Exception, e:
|
logger.log(u'Something is wrong with IMDb api: ' + ex(e), logger.WARNING)
|
||||||
logger.log(u"Error loading IMDb info: " + ex(e), logger.ERROR)
|
except Exception, e:
|
||||||
|
logger.log(u'Error loading IMDb info: ' + ex(e), logger.ERROR)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.show.saveToDB()
|
self.show.saveToDB()
|
||||||
|
@ -520,14 +521,15 @@ class QueueItemUpdate(ShowQueueItem):
|
||||||
self.show.indexer).name + " was incomplete, aborting: " + ex(e), logger.ERROR)
|
self.show.indexer).name + " was incomplete, aborting: " + ex(e), logger.ERROR)
|
||||||
return
|
return
|
||||||
|
|
||||||
logger.log(u"Retrieving show info from IMDb", logger.DEBUG)
|
if sickbeard.USE_IMDB:
|
||||||
try:
|
logger.log(u'Retrieving show info from IMDb', logger.DEBUG)
|
||||||
self.show.loadIMDbInfo()
|
try:
|
||||||
except imdb_exceptions.IMDbError, e:
|
self.show.loadIMDbInfo()
|
||||||
logger.log(u"Something is wrong with IMDb api: " + ex(e), logger.WARNING)
|
except imdb_exceptions.IMDbError, e:
|
||||||
except Exception, e:
|
logger.log(u'Something is wrong with IMDb api: ' + ex(e), logger.WARNING)
|
||||||
logger.log(u"Error loading IMDb info: " + ex(e), logger.ERROR)
|
except Exception, e:
|
||||||
logger.log(traceback.format_exc(), logger.DEBUG)
|
logger.log(u'Error loading IMDb info: ' + ex(e), logger.ERROR)
|
||||||
|
logger.log(traceback.format_exc(), logger.DEBUG)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.show.saveToDB()
|
self.show.saveToDB()
|
||||||
|
|
|
@ -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,
|
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,
|
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,
|
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 = []
|
results = []
|
||||||
|
|
||||||
|
@ -3412,6 +3412,9 @@ class ConfigGeneral(Config):
|
||||||
if indexer_timeout:
|
if indexer_timeout:
|
||||||
sickbeard.INDEXER_TIMEOUT = config.to_int(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:
|
if time_preset:
|
||||||
sickbeard.TIME_PRESET_W_SECONDS = time_preset
|
sickbeard.TIME_PRESET_W_SECONDS = time_preset
|
||||||
sickbeard.TIME_PRESET = sickbeard.TIME_PRESET_W_SECONDS.replace(u':%S', u'')
|
sickbeard.TIME_PRESET = sickbeard.TIME_PRESET_W_SECONDS.replace(u':%S', u'')
|
||||||
|
|
Loading…
Reference in a new issue