This commit is contained in:
2025-04-26 21:27:55 -04:00
parent 6a43d32808
commit 0b70d93d47
9 changed files with 65 additions and 34 deletions

View File

@ -166,5 +166,6 @@ class Genius:
await self.redis_cache.increment_found_count(self.label)
await self.cache.store(matched)
return matched
except:
except Exception as e:
logging.debug("Exception: %s", str(e))
traceback.print_exc()

View File

@ -156,7 +156,9 @@ class LRCLib:
time=time_diff,
)
await self.redis_cache.increment_found_count(self.label)
await self.cache.store(matched)
if plain:
await self.cache.store(matched)
return matched
except:
except Exception as e:
logging.debug("Exception: %s", str(e))
traceback.print_exc()

View File

@ -14,7 +14,7 @@ from lyric_search.constructors import LyricsResult
import redis.asyncio as redis
from redis.commands.search.query import Query # type: ignore
from redis.commands.search.indexDefinition import IndexDefinition, IndexType # type: ignore
from redis.commands.search.field import TextField, TagField # type: ignore
from redis.commands.search.field import TextField # type: ignore
from redis.commands.json.path import Path # type: ignore
from . import private
@ -204,8 +204,8 @@ class RedisCache:
)
return search_res_out
except Exception as e:
logging.debug("Exception: %s", str(e))
traceback.print_exc()
# await self.notifier.send(f"ERROR @ {__file__.rsplit("/", maxsplit=1)[-1]}", f"{str(e)}\nSearch was: {artist} - {song}; fuzzy: {fuzzy_artist} - {fuzzy_song}")
return None
async def redis_store(self, sqlite_id: int, lyr_result: LyricsResult) -> None: