diff --git a/gui/slick/interfaces/default/config_search.tmpl b/gui/slick/interfaces/default/config_search.tmpl
index 83e5c6d7..ceb65e9b 100644
--- a/gui/slick/interfaces/default/config_search.tmpl
+++ b/gui/slick/interfaces/default/config_search.tmpl
@@ -89,6 +89,13 @@
Set high priority for downloads of recently aired episodes?
+
+
+
+
diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py
index 6fd784f2..23157c2e 100644
--- a/sickbeard/__init__.py
+++ b/sickbeard/__init__.py
@@ -167,6 +167,7 @@ USENET_RETENTION = None
TORRENT_METHOD = None
TORRENT_DIR = None
DOWNLOAD_PROPERS = None
+PREFER_EPISODE_RELEASES = None
ALLOW_HIGH_PRIORITY = None
SEARCH_FREQUENCY = None
@@ -460,7 +461,7 @@ def initialize(consoleLogging=True):
with INIT_LOCK:
global ACTUAL_LOG_DIR, LOG_DIR, WEB_PORT, WEB_LOG, ENCRYPTION_VERSION, WEB_ROOT, WEB_USERNAME, WEB_PASSWORD, WEB_HOST, WEB_IPV6, USE_API, API_KEY, ENABLE_HTTPS, HTTPS_CERT, HTTPS_KEY, \
- USE_NZBS, USE_TORRENTS, NZB_METHOD, NZB_DIR, DOWNLOAD_PROPERS, ALLOW_HIGH_PRIORITY, TORRENT_METHOD, \
+ USE_NZBS, USE_TORRENTS, NZB_METHOD, NZB_DIR, DOWNLOAD_PROPERS, PREFER_EPISODE_RELEASES, ALLOW_HIGH_PRIORITY, TORRENT_METHOD, \
SAB_USERNAME, SAB_PASSWORD, SAB_APIKEY, SAB_CATEGORY, SAB_HOST, \
NZBGET_USERNAME, NZBGET_PASSWORD, NZBGET_CATEGORY, NZBGET_HOST, currentSearchScheduler, backlogSearchScheduler, \
TORRENT_USERNAME, TORRENT_PASSWORD, TORRENT_HOST, TORRENT_PATH, TORRENT_RATIO, TORRENT_SEED_TIME, TORRENT_PAUSED, TORRENT_HIGH_BANDWIDTH, TORRENT_LABEL, \
@@ -628,6 +629,8 @@ def initialize(consoleLogging=True):
DOWNLOAD_PROPERS = bool(check_setting_int(CFG, 'General', 'download_propers', 1))
+ PREFER_EPISODE_RELEASES = bool(check_setting_int(CFG, 'General', 'prefer_episode_releases', 0))
+
ALLOW_HIGH_PRIORITY = bool(check_setting_int(CFG, 'General', 'allow_high_priority', 1))
USENET_RETENTION = check_setting_int(CFG, 'General', 'usenet_retention', 500)
@@ -1318,6 +1321,7 @@ def save_config():
new_config['General']['search_frequency'] = int(SEARCH_FREQUENCY)
new_config['General']['update_frequency'] = int(UPDATE_FREQUENCY)
new_config['General']['download_propers'] = int(DOWNLOAD_PROPERS)
+ new_config['General']['prefer_episode_releases'] = int(PREFER_EPISODE_RELEASES
new_config['General']['allow_high_priority'] = int(ALLOW_HIGH_PRIORITY)
new_config['General']['quality_default'] = int(QUALITY_DEFAULT)
new_config['General']['status_default'] = int(STATUS_DEFAULT)
diff --git a/sickbeard/search.py b/sickbeard/search.py
index 0105bd5c..b47892ee 100644
--- a/sickbeard/search.py
+++ b/sickbeard/search.py
@@ -435,11 +435,12 @@ def searchProviders(show, season, episodes, seasonSearch=False, manualSearch=Fal
else:
anyWanted = True
- # if we need every ep in the season and there's nothing better then just download this and be done with it
- if allWanted and bestSeasonNZB.quality == highest_quality_overall:
- logger.log(
- u"Every ep in this season is needed, downloading the whole " + bestSeasonNZB.provider.providerType + " " + bestSeasonNZB.name)
-
+ # if we need every ep in the season check if single episode releases should be preferred over season releases (missing single episode releases will be picked individually from season release)
+ preferSingleEpisodesOverSeasonReleases = sickbeard.PREFER_EPISODE_RELEASES
+ logger.log(u"Prefer single episodes over season releases: "+str(preferSingleEpisodesOverSeasonReleases), logger.DEBUG)
+ # if we need every ep in the season and there's nothing better then just download this and be done with it (unless single episodes are preferred)
+ if allWanted and bestSeasonNZB.quality == highest_quality_overall and not preferSingleEpisodesOverSeasonReleases::
+ logger.log(u"Every ep in this season is needed, downloading the whole " + bestSeasonNZB.provider.providerType + " " + bestSeasonNZB.name)
epObjs = []
for curEpNum in allEps:
epObjs.append(show.getEpisode(season, curEpNum))
diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py
index b8c4de05..2b59fe60 100644
--- a/sickbeard/webserve.py
+++ b/sickbeard/webserve.py
@@ -1056,7 +1056,7 @@ class ConfigSearch:
sab_apikey=None, sab_category=None, sab_host=None, nzbget_username=None, nzbget_password=None,
nzbget_category=None, nzbget_host=None,
nzb_method=None, torrent_method=None, usenet_retention=None, search_frequency=None,
- download_propers=None, allow_high_priority=None,
+ download_propers=None, prefer_episode_releases=None, allow_high_priority=None,
torrent_dir=None, torrent_username=None, torrent_password=None, torrent_host=None,
torrent_label=None, torrent_path=None,
torrent_ratio=None, torrent_seed_time=None, torrent_paused=None, torrent_high_bandwidth=None, ignore_words=None):
@@ -1086,6 +1086,7 @@ class ConfigSearch:
else:
sickbeard.properFinderScheduler.silent = True
+ sickbeard.PREFER_EPISODE_RELEASES = config.checkbox_to_value(prefer_episode_releases)
sickbeard.ALLOW_HIGH_PRIORITY = config.checkbox_to_value(allow_high_priority)
sickbeard.SAB_USERNAME = sab_username