performance: db/aiohttp connection pooling

This commit is contained in:
2025-12-18 07:51:47 -05:00
parent bc8b407a91
commit 10ccf8c8eb
7 changed files with 350 additions and 44 deletions

View File

@@ -1148,10 +1148,10 @@ class SRUtil:
async def get_lrc_by_track_id(self, track_id: int) -> Optional[str]:
"""Get LRC lyrics by track ID."""
logging.info(f"SR: Fetching metadata for track ID {track_id}")
logging.debug(f"SR: Fetching metadata for track ID {track_id}")
metadata = await self.get_metadata_by_track_id(track_id)
lrc = metadata.get("lyrics") if metadata else None
logging.info(f"SR: LRC {'found' if lrc else 'not found'}")
logging.debug(f"SR: LRC {'found' if lrc else 'not found'}")
return lrc
async def get_lrc_by_artist_song(
@@ -1162,7 +1162,7 @@ class SRUtil:
duration: Optional[int] = None,
) -> Optional[str]:
"""Get LRC lyrics by artist and song, optionally filtering by album and duration."""
logging.info(f"SR: Searching tracks for {artist} - {song}")
logging.debug(f"SR: Searching tracks for {artist} - {song}")
tracks = await self.get_tracks_by_artist_song(artist, song)
logging.info(f"SR: Found {len(tracks) if tracks else 0} tracks")
if not tracks: