From 5ca5f36c92da8afbc264bb1e62d2d5cb27866b5f Mon Sep 17 00:00:00 2001 From: Keuin Date: Sun, 4 Jun 2023 00:36:41 +0800 Subject: Smart PDF file name --- htmlcache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'htmlcache.py') diff --git a/htmlcache.py b/htmlcache.py index 922ab09..8264468 100644 --- a/htmlcache.py +++ b/htmlcache.py @@ -15,7 +15,7 @@ class HtmlCache: def __init__(self, cache_path: str): self._cache_path = os.path.abspath(cache_path) - async def get_utaten_tex_source(self, item_id: str) -> str: + async def get_utaten_tex_source(self, item_id: str) -> main.LyricInfo: cache_file_path = os.path.join(self._cache_path, f'{item_id}.html') if os.path.isfile(cache_file_path): async with async_open(cache_file_path, 'r', encoding='utf-8') as f: @@ -31,4 +31,4 @@ class HtmlCache: await f.write(html) except IOError as e: print(f'Failed to update cache for song `{item_id}`: {e}') - return main.html_to_tex(html) + return main.html_extract_lyric_info(html) -- cgit v1.2.3