Package com.tagtraum.ubermusic
Interface LyricsProvider
-
- All Known Implementing Classes:
LuckyLyricsProvider
public interface LyricsProviderTypically aWebServicethat 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 LyricsgetLyrics(AudioSong song)Returns aLyricsobject ornull, if no lyrics can be found.LyricsgetLyrics(String title, String artist)Returns aLyricsobject ornull, if no lyrics can be found.StringgetName()Display name for this provider.
-
-
-
Method Detail
-
getLyrics
Lyrics getLyrics(String title, String artist) throws IOException, IllegalArgumentException
Returns aLyricsobject ornull, if no lyrics can be found.- Parameters:
title- song title, must not benullartist- 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 aLyricsobject 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
-
-