mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-04 18:33:38 +00:00
Merge branch 'hotfix/3.32.12'
Some checks failed
Python Unit Tests / windows (windows-latest, 3.10) (push) Has been cancelled
Python Unit Tests / windows (windows-latest, 3.11) (push) Has been cancelled
Python Unit Tests / windows (windows-latest, 3.12) (push) Has been cancelled
Python Unit Tests / windows (windows-latest, 3.8) (push) Has been cancelled
Python Unit Tests / windows (windows-latest, 3.9) (push) Has been cancelled
Python Unit Tests / linux (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unit Tests / linux (ubuntu-latest, 3.11) (push) Has been cancelled
Python Unit Tests / linux (ubuntu-latest, 3.12) (push) Has been cancelled
Python Unit Tests / linux (ubuntu-latest, 3.8) (push) Has been cancelled
Python Unit Tests / linux (ubuntu-latest, 3.9) (push) Has been cancelled
Python Unit Tests / macos (macos-latest, 3.10) (push) Has been cancelled
Python Unit Tests / macos (macos-latest, 3.11) (push) Has been cancelled
Python Unit Tests / macos (macos-latest, 3.12) (push) Has been cancelled
Python Unit Tests / macos (macos-latest, 3.8) (push) Has been cancelled
Python Unit Tests / macos (macos-latest, 3.9) (push) Has been cancelled
Some checks failed
Python Unit Tests / windows (windows-latest, 3.10) (push) Has been cancelled
Python Unit Tests / windows (windows-latest, 3.11) (push) Has been cancelled
Python Unit Tests / windows (windows-latest, 3.12) (push) Has been cancelled
Python Unit Tests / windows (windows-latest, 3.8) (push) Has been cancelled
Python Unit Tests / windows (windows-latest, 3.9) (push) Has been cancelled
Python Unit Tests / linux (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unit Tests / linux (ubuntu-latest, 3.11) (push) Has been cancelled
Python Unit Tests / linux (ubuntu-latest, 3.12) (push) Has been cancelled
Python Unit Tests / linux (ubuntu-latest, 3.8) (push) Has been cancelled
Python Unit Tests / linux (ubuntu-latest, 3.9) (push) Has been cancelled
Python Unit Tests / macos (macos-latest, 3.10) (push) Has been cancelled
Python Unit Tests / macos (macos-latest, 3.11) (push) Has been cancelled
Python Unit Tests / macos (macos-latest, 3.12) (push) Has been cancelled
Python Unit Tests / macos (macos-latest, 3.8) (push) Has been cancelled
Python Unit Tests / macos (macos-latest, 3.9) (push) Has been cancelled
This commit is contained in:
commit
cfee451d20
3 changed files with 25 additions and 21 deletions
|
@ -1,4 +1,9 @@
|
||||||
### 3.32.11 (2024-11-26 20:15:00 UTC)
|
### 3.32.12 (2024-11-29 19:20:00 UTC)
|
||||||
|
|
||||||
|
* Fix split_result to return a list in the case of an internal exception
|
||||||
|
|
||||||
|
|
||||||
|
### 3.32.11 (2024-11-26 20:15:00 UTC)
|
||||||
|
|
||||||
* Fix nzbSplitter needs to use binary data for xml parser
|
* Fix nzbSplitter needs to use binary data for xml parser
|
||||||
|
|
||||||
|
|
|
@ -167,17 +167,15 @@ def _strip_ns(element, ns):
|
||||||
|
|
||||||
|
|
||||||
def split_result(result):
|
def split_result(result):
|
||||||
|
# type: (sickgear.classes.SearchResult) -> List[sickgear.classes.SearchResult]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
:param result: search result
|
:param result: search result
|
||||||
:type result: sickgear.classes.SearchResult
|
|
||||||
:return: list of search results
|
|
||||||
:rtype: List[sickgear.classes.SearchResult]
|
|
||||||
"""
|
"""
|
||||||
resp = helpers.get_url(result.url, failure_monitor=False, as_binary=True)
|
resp = helpers.get_url(result.url, failure_monitor=False, as_binary=True)
|
||||||
if None is resp:
|
if None is resp:
|
||||||
logger.error(f'Unable to load url {result.url}, can\'t download season NZB')
|
logger.error(f'Unable to load url {result.url}, can\'t download season NZB')
|
||||||
return False
|
return []
|
||||||
|
|
||||||
# parse the season ep name
|
# parse the season ep name
|
||||||
try:
|
try:
|
||||||
|
@ -185,10 +183,10 @@ def split_result(result):
|
||||||
parse_result = np.parse(result.name)
|
parse_result = np.parse(result.name)
|
||||||
except InvalidNameException:
|
except InvalidNameException:
|
||||||
logger.debug(f'Unable to parse the filename {result.name} into a valid episode')
|
logger.debug(f'Unable to parse the filename {result.name} into a valid episode')
|
||||||
return False
|
return []
|
||||||
except InvalidShowException:
|
except InvalidShowException:
|
||||||
logger.debug(f'Unable to parse the filename {result.name} into a valid show')
|
logger.debug(f'Unable to parse the filename {result.name} into a valid show')
|
||||||
return False
|
return []
|
||||||
|
|
||||||
# bust it up
|
# bust it up
|
||||||
season = parse_result.season_number if None is not parse_result.season_number else 1
|
season = parse_result.season_number if None is not parse_result.season_number else 1
|
||||||
|
@ -207,10 +205,10 @@ def split_result(result):
|
||||||
parse_result = np.parse(new_nzb)
|
parse_result = np.parse(new_nzb)
|
||||||
except InvalidNameException:
|
except InvalidNameException:
|
||||||
logger.debug(f'Unable to parse the filename {new_nzb} into a valid episode')
|
logger.debug(f'Unable to parse the filename {new_nzb} into a valid episode')
|
||||||
return False
|
return []
|
||||||
except InvalidShowException:
|
except InvalidShowException:
|
||||||
logger.debug(f'Unable to parse the filename {new_nzb} into a valid show')
|
logger.debug(f'Unable to parse the filename {new_nzb} into a valid show')
|
||||||
return False
|
return []
|
||||||
|
|
||||||
# make sure the result is sane
|
# make sure the result is sane
|
||||||
if (None is not parse_result.season_number and season != parse_result.season_number) \
|
if (None is not parse_result.season_number and season != parse_result.season_number) \
|
||||||
|
|
|
@ -972,6 +972,7 @@ def search_providers(
|
||||||
# if not, break it apart and add them as the lowest priority results
|
# if not, break it apart and add them as the lowest priority results
|
||||||
individual_results = nzbSplitter.split_result(best_season_result)
|
individual_results = nzbSplitter.split_result(best_season_result)
|
||||||
|
|
||||||
|
if isinstance(individual_results, list):
|
||||||
for cur_result in filter(
|
for cur_result in filter(
|
||||||
lambda r: r.show_obj == show_obj and show_name_helpers.pass_wordlist_checks(
|
lambda r: r.show_obj == show_obj and show_name_helpers.pass_wordlist_checks(
|
||||||
r.name, parse=False, indexer_lookup=False, show_obj=r.show_obj), individual_results):
|
r.name, parse=False, indexer_lookup=False, show_obj=r.show_obj), individual_results):
|
||||||
|
|
Loading…
Reference in a new issue