Package com.tagtraum.ubermusic
Interface LyricsProvider
-
- All Known Implementing Classes:
LuckyLyricsProvider
public interface LyricsProvider
Typically aWebService
that can look up lyrics for a given song. Implement this interface and supply it as plugin to create your own lyrics lookup service.- Author:
- Hendrik Schreiber
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Lyrics
getLyrics(AudioSong song)
Returns aLyrics
object ornull
, if no lyrics can be found.Lyrics
getLyrics(String title, String artist)
Returns aLyrics
object ornull
, if no lyrics can be found.String
getName()
Display name for this provider.
-
-
-
Method Detail
-
getLyrics
Lyrics getLyrics(String title, String artist) throws IOException, IllegalArgumentException
Returns aLyrics
object ornull
, if no lyrics can be found.- Parameters:
title
- song title, must not benull
artist
- artist name, must not benull
- Returns:
- lyrics object
- Throws:
IOException
- if something goes wrongIllegalArgumentException
- if either title or artist arenull
, the empty string or only whitespace
-
getLyrics
default Lyrics getLyrics(AudioSong song) throws IOException, IllegalArgumentException
Returns aLyrics
object ornull
, if no lyrics can be found.- Parameters:
song
- song- Returns:
- lyrics object
- Throws:
IOException
- if something goes wrongIllegalArgumentException
- if either title or artist arenull
, the empty string or only whitespace
-
getName
String getName()
Display name for this provider.- Returns:
- display name
-
-