Add tests for encoders

and some refactoring
This commit is contained in:
Ritiek Malhotra
2020-03-17 17:58:44 +05:30
parent 29005f24ed
commit dae76a0abb
12 changed files with 210 additions and 21 deletions

View File

@@ -5,13 +5,13 @@ from spotdl.lyrics.exceptions import LyricsNotFoundError
class LyricWikia(LyricBase):
def __init__(self, artist, song):
def __init__(self, artist, track):
self.artist = artist
self.song = song
self.track = track
def get_lyrics(self, linesep="\n", timeout=None):
try:
lyrics = lyricwikia.get_lyrics(self.artist, self.song, linesep, timeout)
lyrics = lyricwikia.get_lyrics(self.artist, self.track, linesep, timeout)
except lyricwikia.LyricsNotFound as e:
raise LyricsNotFoundError(e.args[0])
else: