tweaks
This commit is contained in:
@@ -21,8 +21,11 @@ class Aggregate:
|
||||
exclude_methods: list = []
|
||||
self.exclude_methods = exclude_methods
|
||||
|
||||
async def search(self, artist: str, song: str) -> Optional[LyricsResult]:
|
||||
async def search(self, artist: str, song: str, plain: bool = True) -> Optional[LyricsResult]:
|
||||
"""Aggregate Search"""
|
||||
if not plain:
|
||||
logging.info("LRCs requested, limiting search to LRCLib")
|
||||
self.exclude_methods = ["genius", "cache"]
|
||||
logging.info("Performing aggregate search")
|
||||
cache_search = cache.Cache()
|
||||
genius_search = genius.Genius()
|
||||
@@ -35,7 +38,8 @@ class Aggregate:
|
||||
if source.label.lower() in self.exclude_methods:
|
||||
logging.info("Skipping source: %s, excluded.", source.label)
|
||||
continue
|
||||
search_result = await source.search(artist, song)
|
||||
search_result = await source.search(artist=artist, song=song,
|
||||
plain=plain)
|
||||
if search_result:
|
||||
break
|
||||
logging.info("%s: NOT FOUND!", source.label)
|
||||
|
||||
Reference in New Issue
Block a user