mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +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,13 +444,18 @@ 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 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):
|
||||
need_hd = True
|
||||
if not need_uhd and max(s.wantedQuality) > max_hd:
|
||||
need_uhd = True
|
||||
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):
|
||||
need_hd = True
|
||||
if not need_uhd and max(s.wantedQuality) > max_hd:
|
||||
need_uhd = True
|
||||
per_ep, limit_per_ep = 0, 0
|
||||
if need_sd and not need_hd:
|
||||
per_ep, limit_per_ep = 10, 25
|
||||
|
@ -474,12 +479,15 @@ 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 min(ep_obj.wantedQuality) <= max_sd:
|
||||
need_sd = True
|
||||
if any(i in hd_qualities for i in ep_obj.wantedQuality):
|
||||
need_hd = True
|
||||
if max(ep_obj.wantedQuality) > max_hd:
|
||||
need_uhd = True
|
||||
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):
|
||||
need_hd = True
|
||||
if max(ep_obj.wantedQuality) > max_hd:
|
||||
need_uhd = True
|
||||
return (season_search, need_sd, need_hd, need_uhd,
|
||||
(hits_per_page * 100 // hits_per_page * 2, hits_per_page * int(ceil(rel_limit * 1.5)))[season_search])
|
||||
|
||||
|
|
|
@ -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,15 +206,20 @@ 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 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):
|
||||
need_hd = True
|
||||
if not need_uhd and max_hd < max(w.wantedQuality):
|
||||
need_uhd = True
|
||||
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):
|
||||
need_hd = True
|
||||
if not need_uhd and max_hd < max(w.wantedQuality):
|
||||
need_uhd = True
|
||||
self.episodes.extend(wanted_eps)
|
||||
|
||||
self.update_providers(need_anime=need_anime, need_sports=need_sports,
|
||||
|
|
Loading…
Reference in a new issue