mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-18 08:43:37 +00:00
Merge branch 'feature/ChangeBacklogSort' into dev
This commit is contained in:
commit
25b32bdf7e
3 changed files with 16 additions and 1 deletions
|
@ -3,6 +3,8 @@
|
|||
* Update Beautiful Soup 4.11.1 (r642) to 4.12.2
|
||||
* Update soupsieve 2.3.2.post1 (792d566) to 2.4.1 (2e66beb)
|
||||
* Fix regex that was not using py312 notation
|
||||
* Change sort backlog and manual segment search results episode number
|
||||
* Change sort episodes when set to wanted on display show page
|
||||
|
||||
|
||||
### 3.29.4 (2023-06-07 13:45:00 UTC)
|
||||
|
|
|
@ -653,6 +653,11 @@ class ManualSearchQueueItem(BaseSearchQueueItem):
|
|||
search_result = search.search_providers(self.show_obj, [self.segment], True, try_other_searches=True)
|
||||
|
||||
if search_result:
|
||||
# sort results by season, episode number
|
||||
try:
|
||||
search_result.sort(key=lambda a: (a.ep_obj_list[0].season or 0, a.ep_obj_list[0].episode or 0))
|
||||
except (BaseException, Exception):
|
||||
pass
|
||||
for result in search_result: # type: sickgear.classes.NZBSearchResult
|
||||
logger.log(f'Downloading {result.name} from {result.provider.name}')
|
||||
self.success = search.snatch_episode(result)
|
||||
|
@ -734,6 +739,11 @@ class BacklogQueueItem(BaseSearchQueueItem):
|
|||
scheduled=self.standard_backlog)
|
||||
|
||||
if search_result:
|
||||
# sort results by season, episode number
|
||||
try:
|
||||
search_result.sort(key=lambda a: (a.ep_obj_list[0].season or 0, a.ep_obj_list[0].episode or 0))
|
||||
except (BaseException, Exception):
|
||||
pass
|
||||
for result in search_result: # type: sickgear.classes.NZBSearchResult
|
||||
logger.log(f'Downloading {result.name} from {result.provider.name}')
|
||||
if search.snatch_episode(result):
|
||||
|
|
|
@ -3202,7 +3202,10 @@ class Home(MainHandler):
|
|||
if None is not eps:
|
||||
|
||||
sql_l = []
|
||||
for cur_ep in eps.split('|'):
|
||||
# sort episode numbers
|
||||
eps_list = eps.split('|')
|
||||
eps_list.sort()
|
||||
for cur_ep in eps_list:
|
||||
|
||||
logger.debug(f'Attempting to set status on episode {cur_ep} to {status}')
|
||||
|
||||
|
|
Loading…
Reference in a new issue