minor
This commit is contained in:
@@ -26,6 +26,7 @@ class LRCLib:
|
||||
song: str,
|
||||
plain: Optional[bool] = True,
|
||||
duration: Optional[int] = None,
|
||||
raw: bool = False,
|
||||
) -> Optional[LyricsResult]:
|
||||
"""
|
||||
LRCLib Local Database Search
|
||||
@@ -34,6 +35,7 @@ class LRCLib:
|
||||
song (str): the song to search
|
||||
plain (bool): return plain lyrics (True) or synced lyrics (False)
|
||||
duration (int): optional track duration for better matching
|
||||
raw (bool): return raw LRC string instead of parsed object (only for synced)
|
||||
Returns:
|
||||
Optional[LyricsResult]: The result, if found - None otherwise.
|
||||
"""
|
||||
@@ -119,7 +121,10 @@ class LRCLib:
|
||||
logging.info("No synced lyrics available on %s", self.label)
|
||||
return None
|
||||
returned_lyrics = best_match.synced_lyrics
|
||||
lrc_obj = self.datautils.create_lrc_object(returned_lyrics)
|
||||
if raw:
|
||||
lrc_obj = returned_lyrics
|
||||
else:
|
||||
lrc_obj = self.datautils.create_lrc_object(returned_lyrics)
|
||||
|
||||
# Calculate match confidence
|
||||
input_track = f"{artist} - {song}"
|
||||
|
||||
Reference in New Issue
Block a user