Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 46e8b2c9eb | |||
| ec24325036 | |||
| 4ec95d8ba9 | |||
| d52b9a55f4 | |||
| 12681720e9 |
@@ -1 +1 @@
|
|||||||
v1.5.3
|
v1.5.5
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "aniworld-web",
|
"name": "aniworld-web",
|
||||||
"version": "1.5.3",
|
"version": "1.5.5",
|
||||||
"description": "Aniworld Anime Download Manager - Web Frontend",
|
"description": "Aniworld Anime Download Manager - Web Frontend",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class SerieList:
|
|||||||
"""Return all series that still contain missing episodes."""
|
"""Return all series that still contain missing episodes."""
|
||||||
return [
|
return [
|
||||||
anime for anime in self.keyDict.values()
|
anime for anime in self.keyDict.values()
|
||||||
if anime.episodeDict
|
if getattr(anime, 'episodeDict', None)
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_missing_episodes(self) -> List[AnimeSeries]:
|
def get_missing_episodes(self) -> List[AnimeSeries]:
|
||||||
|
|||||||
@@ -205,6 +205,8 @@ class AnimeSeries(Base, TimestampMixin):
|
|||||||
try:
|
try:
|
||||||
if self.episodes:
|
if self.episodes:
|
||||||
for ep in self.episodes:
|
for ep in self.episodes:
|
||||||
|
if ep.is_downloaded:
|
||||||
|
continue
|
||||||
season = ep.season or 1
|
season = ep.season or 1
|
||||||
if season not in episode_dict:
|
if season not in episode_dict:
|
||||||
episode_dict[season] = []
|
episode_dict[season] = []
|
||||||
|
|||||||
@@ -162,17 +162,18 @@ class ImageLoadingService:
|
|||||||
for i in range(0, len(series_list), self.BATCH_SIZE):
|
for i in range(0, len(series_list), self.BATCH_SIZE):
|
||||||
batch = series_list[i : i + self.BATCH_SIZE]
|
batch = series_list[i : i + self.BATCH_SIZE]
|
||||||
|
|
||||||
tasks = [
|
# Process each series sequentially to avoid concurrent use of the
|
||||||
self.load_series_images(
|
# same AsyncSession (SQLAlchemy async sessions are not thread-safe
|
||||||
|
# for concurrent operations). BATCH_SIZE still paces TMDB requests.
|
||||||
|
results: List[Dict[str, Any] | Exception] = []
|
||||||
|
for series in batch:
|
||||||
|
result = await self.load_series_images(
|
||||||
key=series["key"],
|
key=series["key"],
|
||||||
folder=series["folder"],
|
folder=series["folder"],
|
||||||
anime_directory=anime_directory,
|
anime_directory=anime_directory,
|
||||||
db=db,
|
db=db,
|
||||||
)
|
)
|
||||||
for series in batch
|
results.append(result)
|
||||||
]
|
|
||||||
|
|
||||||
results = await asyncio.gather(*tasks, return_exceptions=True)
|
|
||||||
|
|
||||||
for series, result in zip(batch, results):
|
for series, result in zip(batch, results):
|
||||||
if isinstance(result, Exception):
|
if isinstance(result, Exception):
|
||||||
|
|||||||
Reference in New Issue
Block a user