Skip to content

Commit be6fde8

Browse files
committed
fix: Replace deprecated time function calls with time.time() for accuracy
1 parent d85a2ec commit be6fde8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

app/utils/title_resolver.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
from __future__ import annotations
2-
import sys
3-
import os
42
from loguru import logger
53
from app.utils.logger import config as configure_logger
64

@@ -10,8 +8,6 @@
108
import time
119
import requests.exceptions
1210
from pathlib import Path
13-
from functools import lru_cache
14-
from time import time
1511

1612
import re
1713
from app.utils.http_client import get as http_get # type: ignore
@@ -239,7 +235,7 @@ def load_or_refresh_index(site: str = "aniworld.to") -> Dict[str, str]:
239235
slug_to_title (Dict[str, str]): Mapping of slug -> display title for the requested site (empty if no index is available).
240236
"""
241237
global _cached_indices, _cached_at, _cached_alts
242-
now = time()
238+
now = time.time()
243239

244240
logger.debug(f"Starting load_or_refresh_index for site: {site}.")
245241

@@ -359,7 +355,7 @@ def load_or_refresh_alternatives(site: str = "aniworld.to") -> Dict[str, List[st
359355
Dict[str, List[str]]: Mapping from slug to a list of alternative display titles (the first element is the primary/display title). If no alternatives are available, returns an empty dict.
360356
"""
361357
global _cached_alts
362-
now = time()
358+
now = time.time()
363359
site_cfg = CATALOG_SITE_CONFIGS.get(site) or CATALOG_SITE_CONFIGS.get(
364360
"aniworld.to", {}
365361
)

0 commit comments

Comments
 (0)