Miglioria commit precedente

This commit is contained in:
marco
2021-12-14 20:35:55 +01:00
parent 1eb23954fd
commit 3a251b2247
2 changed files with 4 additions and 4 deletions

View File

@@ -128,9 +128,9 @@ def episodios(item):
servers = support.server(item, it.stagione, AutoPlay=False, CheckLinks=False, Download=False, Videolibrary=False)
episodes = {}
for s in servers:
# ottengo l'episodio dal nome del file
with futures.ThreadPoolExecutor() as executor:
for s in servers:
executor.submit(get_ep, s)
ret.extend([it.clone(title=ep, contentSeason=int(ep.split('x')[0]), contentEpisodeNumber=int(ep.split('x')[1]), servers=[srv.tourl() for srv in episodes[ep]]) for ep in episodes])
else:

View File

@@ -438,7 +438,7 @@ def get_season_and_episode(title):
@return: Nseason and episode number in "1x01" format or empty string if not found
"""
filename = ""
patrons = ["[ .](\d+)\s*[x-]\s*(\d+)[ .]", "(\d+)\s*×\s*(\d+)", "(?:s|t)(\d+)[ .]?(?:e|Ep\.?)(\d+)",
patrons = ["(?:[ .]|^)(\d+)\s*[x-]\s*(\d+)(?:[ .]|$)", "(\d+)\s*×\s*(\d+)", "(?:s|t)(\d+)[ .]?(?:e|Ep\.?)(\d+)",
"(?:(?:stag|season|stagione\w*)\s*(\d+))?\s*(?:ep|epi|epis|episod[ioe]?|puntata)[ .-]*(\d+)"]
for patron in patrons: