-#if $seasonResults
+#if 0 < len($seasonResults)
##There is a special/season_0?##
#set $season_special = (0, 1)[0 == int($seasonResults[-1]['season'])]
##
@@ -397,7 +397,11 @@
#end if
##
#if 0 == len($sqlResults)
-
Episodes no longer exist for this show at the associated indexer
+
#else:
#for $epResult in $sqlResults
#set $epStr = '%sx%s' % ($epResult['season'], $epResult['episode'])
@@ -518,7 +522,7 @@
' %\
('None', ('" id="plot_info_%s_%s_%s' % ($show.indexerid, $epResult['season'], $epResult['episode'])))[None is not $epResult['description'] and '' != $epResult['description']]#
- $epResult['name']
+ <%= 'TBA' if not epResult['name'] or 'TBA' == epResult['name'] else epResult['name'] %>
|
diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py
index 609d04b3..1118f245 100755
--- a/sickbeard/__init__.py
+++ b/sickbeard/__init__.py
@@ -84,6 +84,7 @@ traktCheckerScheduler = None
showList = None
UPDATE_SHOWS_ON_START = False
SHOW_UPDATE_HOUR = 3
+ALLOW_INCOMPLETE_SHOWDATA = False
providerList = []
newznabProviderList = []
@@ -474,7 +475,7 @@ def initialize(consoleLogging=True):
USE_TRAKT, TRAKT_USERNAME, TRAKT_PASSWORD, TRAKT_API, TRAKT_REMOVE_WATCHLIST, TRAKT_USE_WATCHLIST, TRAKT_METHOD_ADD, TRAKT_START_PAUSED, traktCheckerScheduler, TRAKT_USE_RECOMMENDED, TRAKT_SYNC, TRAKT_DEFAULT_INDEXER, TRAKT_REMOVE_SERIESLIST, \
USE_PLEX, PLEX_NOTIFY_ONSNATCH, PLEX_NOTIFY_ONDOWNLOAD, PLEX_NOTIFY_ONSUBTITLEDOWNLOAD, PLEX_UPDATE_LIBRARY, \
PLEX_SERVER_HOST, PLEX_HOST, PLEX_USERNAME, PLEX_PASSWORD, DEFAULT_BACKLOG_FREQUENCY, MIN_BACKLOG_FREQUENCY, MAX_BACKLOG_FREQUENCY, BACKLOG_STARTUP, SKIP_REMOVED_FILES, \
- showUpdateScheduler, __INITIALIZED__, LAUNCH_BROWSER, TRASH_REMOVE_SHOW, TRASH_ROTATE_LOGS, HOME_SEARCH_FOCUS, SORT_ARTICLE, showList, loadingShowList, UPDATE_SHOWS_ON_START, SHOW_UPDATE_HOUR, \
+ showUpdateScheduler, __INITIALIZED__, LAUNCH_BROWSER, TRASH_REMOVE_SHOW, TRASH_ROTATE_LOGS, HOME_SEARCH_FOCUS, SORT_ARTICLE, showList, loadingShowList, UPDATE_SHOWS_ON_START, SHOW_UPDATE_HOUR, ALLOW_INCOMPLETE_SHOWDATA, \
NEWZNAB_DATA, INDEXER_DEFAULT, INDEXER_TIMEOUT, USENET_RETENTION, TORRENT_DIR, \
QUALITY_DEFAULT, FLATTEN_FOLDERS_DEFAULT, SUBTITLES_DEFAULT, STATUS_DEFAULT, WANTED_BEGIN_DEFAULT, WANTED_LATEST_DEFAULT, RECENTSEARCH_STARTUP, \
GROWL_NOTIFY_ONSNATCH, GROWL_NOTIFY_ONDOWNLOAD, GROWL_NOTIFY_ONSUBTITLEDOWNLOAD, TWITTER_NOTIFY_ONSNATCH, TWITTER_NOTIFY_ONDOWNLOAD, TWITTER_NOTIFY_ONSUBTITLEDOWNLOAD, \
@@ -624,6 +625,8 @@ def initialize(consoleLogging=True):
UPDATE_SHOWS_ON_START = bool(check_setting_int(CFG, 'General', 'update_shows_on_start', 0))
SHOW_UPDATE_HOUR = check_setting_int(CFG, 'General', 'show_update_hour', 3)
SHOW_UPDATE_HOUR = minimax(SHOW_UPDATE_HOUR, 3, 0, 23)
+ ALLOW_INCOMPLETE_SHOWDATA = bool(check_setting_int(CFG, 'General', 'allow_incomplete_showdata', 0))
+
TRASH_REMOVE_SHOW = bool(check_setting_int(CFG, 'General', 'trash_remove_show', 0))
TRASH_ROTATE_LOGS = bool(check_setting_int(CFG, 'General', 'trash_rotate_logs', 0))
@@ -1418,6 +1421,7 @@ def save_config():
new_config['General']['launch_browser'] = int(LAUNCH_BROWSER)
new_config['General']['update_shows_on_start'] = int(UPDATE_SHOWS_ON_START)
new_config['General']['show_update_hour'] = int(SHOW_UPDATE_HOUR)
+ new_config['General']['allow_incomplete_showdata'] = int(ALLOW_INCOMPLETE_SHOWDATA)
new_config['General']['trash_remove_show'] = int(TRASH_REMOVE_SHOW)
new_config['General']['trash_rotate_logs'] = int(TRASH_ROTATE_LOGS)
new_config['General']['home_search_focus'] = int(HOME_SEARCH_FOCUS)
diff --git a/sickbeard/show_queue.py b/sickbeard/show_queue.py
index 3aa7cf75..e7631745 100644
--- a/sickbeard/show_queue.py
+++ b/sickbeard/show_queue.py
@@ -301,12 +301,11 @@ class QueueItemAdd(ShowQueueItem):
self._finishEarly()
return
# if the show has no episodes/seasons
- if not s:
- logger.log(u'Show ' + str(s['seriesname']) + ' is on ' + str(
- sickbeard.indexerApi(self.indexer).name) + ' but contains no season/episode data.', logger.ERROR)
- ui.notifications.error('Unable to add show',
- 'Show ' + str(s['seriesname']) + ' is on ' + str(sickbeard.indexerApi(
- self.indexer).name) + ' but contains no season/episode data.')
+ if not sickbeard.ALLOW_INCOMPLETE_SHOWDATA and not s:
+ msg = u'Show %s is on %s but contains no season/episode data. Only the show folder was created.'\
+ % (s['seriesname'], sickbeard.indexerApi(self.indexer).name)
+ logger.log(msg, logger.ERROR)
+ ui.notifications.error('Unable to add show', msg)
self._finishEarly()
return
except Exception as e:
diff --git a/sickbeard/tv.py b/sickbeard/tv.py
index 075ddee8..f73d7fd1 100644
--- a/sickbeard/tv.py
+++ b/sickbeard/tv.py
@@ -1698,7 +1698,7 @@ class TVEpisode(object):
self.deleteEpisode()
return
- if getattr(myEp, 'episodename', None) is None:
+ if not sickbeard.ALLOW_INCOMPLETE_SHOWDATA and getattr(myEp, 'episodename', None) is None:
logger.log(u"This episode (" + self.show.name + " - " + str(season) + "x" + str(
episode) + ") has no name on " + sickbeard.indexerApi(self.indexer).name + "")
# if I'm incomplete on TVDB but I once was complete then just delete myself from the DB for now
diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py
index 03832344..6236238a 100644
--- a/sickbeard/webserve.py
+++ b/sickbeard/webserve.py
@@ -3439,7 +3439,8 @@ class ConfigGeneral(Config):
return m.hexdigest()
def saveGeneral(self, log_dir=None, web_port=None, web_log=None, encryption_version=None, web_ipv6=None,
- update_shows_on_start=None, show_update_hour=None, trash_remove_show=None, trash_rotate_logs=None, update_frequency=None, launch_browser=None, web_username=None,
+ update_shows_on_start=None, show_update_hour=None, allow_incomplete_showdata=None,
+ trash_remove_show=None, trash_rotate_logs=None, update_frequency=None, launch_browser=None, web_username=None,
use_api=None, api_key=None, indexer_default=None, timezone_display=None, cpu_preset=None, file_logging_preset=None,
web_password=None, version_notify=None, enable_https=None, https_cert=None, https_key=None,
handle_reverse_proxy=None, home_search_focus=None, sort_article=None, auto_update=None, notify_on_update=None,
@@ -3460,6 +3461,7 @@ class ConfigGeneral(Config):
sickbeard.UPDATE_SHOWS_ON_START = config.checkbox_to_value(update_shows_on_start)
sickbeard.SHOW_UPDATE_HOUR = config.minimax(show_update_hour, 3, 0, 23)
+ sickbeard.ALLOW_INCOMPLETE_SHOWDATA = config.checkbox_to_value(allow_incomplete_showdata)
sickbeard.TRASH_REMOVE_SHOW = config.checkbox_to_value(trash_remove_show)
sickbeard.TRASH_ROTATE_LOGS = config.checkbox_to_value(trash_rotate_logs)
config.change_UPDATE_FREQUENCY(update_frequency)
|