revisions
This commit is contained in:
@@ -4,11 +4,15 @@
|
||||
import sys
|
||||
sys.path.insert(1,'..')
|
||||
import traceback
|
||||
import logging
|
||||
from aiohttp import ClientTimeout, ClientSession
|
||||
from lyric_search_new import utils
|
||||
from lyric_search_new.constructors import LyricsResult
|
||||
from . import common
|
||||
|
||||
logger = logging.getLogger()
|
||||
log_level = logging.getLevelName(logger.level)
|
||||
|
||||
class InvalidResponseException(Exception):
|
||||
"""
|
||||
Invalid Response Exception
|
||||
@@ -68,14 +72,15 @@ class LRCLib:
|
||||
candidate_tracks=[(0, returned_track)])
|
||||
if not confidence:
|
||||
return # No suitable match found
|
||||
print("Returning!")
|
||||
logging.info("Result found on %s", self.label)
|
||||
return LyricsResult(artist=returned_artist,
|
||||
song=returned_song,
|
||||
src=self.label,
|
||||
lyrics=returned_lyrics,
|
||||
confidence=confidence)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
if log_level == "DEBUG":
|
||||
traceback.print_exc()
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user