summaryrefslogtreecommitdiff
path: root/htmlcache.py
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-06-04 00:36:41 +0800
committerKeuin <[email protected]>2023-06-04 00:36:46 +0800
commit5ca5f36c92da8afbc264bb1e62d2d5cb27866b5f (patch)
tree15316729c6f55864cc4449be414a2b5a5e9635e6 /htmlcache.py
parent18af87c1e3048e96ca66d64c475e832c858316b4 (diff)
Smart PDF file name
Diffstat (limited to 'htmlcache.py')
-rw-r--r--htmlcache.py4
1 files changed, 2 insertions, 2 deletions
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)