Song cache

This commit is contained in:
A-random-githuber
2025-12-26 00:26:22 +07:00
committed by GitHub
parent d11a8435b3
commit 71b789fbaa
2 changed files with 197 additions and 19 deletions

View File

@@ -327,7 +327,8 @@ class FileChecker:
def check_song_file(self) -> bool:
'''检查song有关文件并初始化缓存'''
f = self.check_folder(Config.SONG_FILE_FOLDER_PATH)
self.logger.info("Initialize song data...")
song_cache_path = os.path.join(os.path.dirname(Config.SQLITE_DATABASE_PATH) or '.', 'song_cache.db')
self.logger.info("Initialize song data..." if not os.path.isfile(song_cache_path) else "Reusing song data cache...")
try:
DownloadList.initialize_cache()
if not Config.SONG_FILE_HASH_PRE_CALCULATE: