minor: formatting
This commit is contained in:
@@ -29,7 +29,11 @@ class LRCLib:
|
||||
|
||||
@retry(stop=stop_after_attempt(2), wait=wait_fixed(0.5))
|
||||
async def search(
|
||||
self, artist: str, song: str, plain: Optional[bool] = True, duration: Optional[int] = None
|
||||
self,
|
||||
artist: str,
|
||||
song: str,
|
||||
plain: Optional[bool] = True,
|
||||
duration: Optional[int] = None,
|
||||
) -> Optional[LyricsResult]:
|
||||
"""
|
||||
LRCLib Search
|
||||
@@ -81,7 +85,11 @@ class LRCLib:
|
||||
|
||||
# Filter by duration if provided
|
||||
if duration:
|
||||
search_data = [r for r in search_data if abs(r.get("duration", 0) - duration) <= 10]
|
||||
search_data = [
|
||||
r
|
||||
for r in search_data
|
||||
if abs(r.get("duration", 0) - duration) <= 10
|
||||
]
|
||||
|
||||
if plain:
|
||||
possible_matches = [
|
||||
@@ -107,7 +115,8 @@ class LRCLib:
|
||||
best_match = None
|
||||
try:
|
||||
match_result = self.matcher.find_best_match(
|
||||
input_track, possible_matches # type: ignore
|
||||
input_track,
|
||||
possible_matches, # type: ignore
|
||||
)
|
||||
if match_result:
|
||||
best_match = match_result[0]
|
||||
|
Reference in New Issue
Block a user