mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Change don't exclude "unknown" from search.
Fix UHD category select in Recent Search. Change speed improvement in finding needed categories/qualities (sd, hd, uhd).
This commit is contained in:
parent
2dccb15e0e
commit
e071542b51
4 changed files with 34 additions and 21 deletions
|
@ -1800,7 +1800,7 @@ def save_config():
|
|||
def launch_browser(start_port=None):
|
||||
if not start_port:
|
||||
start_port = WEB_PORT
|
||||
browser_url = 'http%s://localhost:%d%s' % (('s' or '')[not ENABLE_HTTPS], start_port, WEB_ROOT)
|
||||
browser_url = 'http%s://localhost:%d%s' % (('s', '')[not ENABLE_HTTPS], start_port, WEB_ROOT)
|
||||
try:
|
||||
webbrowser.open(browser_url, 2, 1)
|
||||
except (StandardError, Exception):
|
||||
|
|
|
@ -444,7 +444,12 @@ class NewznabProvider(generic.NZBProvider):
|
|||
Quality.HDBLURAY, Quality.FULLHDBLURAY]
|
||||
max_hd = Quality.FULLHDBLURAY
|
||||
for s in searches:
|
||||
if need_sd and need_hd and need_uhd:
|
||||
break
|
||||
if not s.show.is_anime and not s.show.is_sports:
|
||||
if Quality.UNKNOWN in s.wantedQuality:
|
||||
need_sd = need_hd = need_uhd = True
|
||||
else:
|
||||
if not need_sd and min(s.wantedQuality) <= max_sd:
|
||||
need_sd = True
|
||||
if not need_hd and any(i in hd_qualities for i in s.wantedQuality):
|
||||
|
@ -474,6 +479,9 @@ class NewznabProvider(generic.NZBProvider):
|
|||
if not season_search:
|
||||
need_sd = need_hd = need_uhd = False
|
||||
if not ep_obj.show.is_anime and not ep_obj.show.is_sports:
|
||||
if Quality.UNKNOWN in ep_obj.wantedQuality:
|
||||
need_sd = need_hd = need_uhd = True
|
||||
else:
|
||||
if min(ep_obj.wantedQuality) <= max_sd:
|
||||
need_sd = True
|
||||
if any(i in hd_qualities for i in ep_obj.wantedQuality):
|
||||
|
|
|
@ -387,7 +387,7 @@ def wanted_episodes(show, from_date, make_dict=False, unaired=False):
|
|||
|
||||
ep_obj = show.getEpisode(int(result['season']), int(result['episode']))
|
||||
ep_obj.wantedQuality = [i for i in (wanted_qualities, initial_qualities)[not_downloaded]
|
||||
if (common.Quality.UNKNOWN != i and cur_quality < i)]
|
||||
if cur_quality < i]
|
||||
ep_obj.eps_aired_in_season = ep_count.get(helpers.tryInt(result['season']), 0)
|
||||
ep_obj.eps_aired_in_scene_season = ep_count_scene.get(
|
||||
helpers.tryInt(result['scene_season']), 0) if result['scene_season'] else ep_obj.eps_aired_in_season
|
||||
|
|
|
@ -206,9 +206,14 @@ class RecentSearchQueueItem(generic_queue.QueueItem):
|
|||
need_anime = True
|
||||
if not need_sports and curShow.is_sports:
|
||||
need_sports = True
|
||||
if not need_sd or not need_hd:
|
||||
if not need_sd or not need_hd or not need_uhd:
|
||||
for w in wanted_eps:
|
||||
if need_sd and need_hd and need_uhd:
|
||||
break
|
||||
if not w.show.is_anime and not w.show.is_sports:
|
||||
if Quality.UNKNOWN in w.wantedQuality:
|
||||
need_sd = need_hd = need_uhd = True
|
||||
else:
|
||||
if not need_sd and max_sd >= min(w.wantedQuality):
|
||||
need_sd = True
|
||||
if not need_hd and any(i in hd_qualities for i in w.wantedQuality):
|
||||
|
|
Loading…
Reference in a new issue