public interface ISource extends IExtension
Modifier and Type | Method and Description |
---|---|
IEpisode |
getEpisode(ISeason season,
int episodeNum,
java.io.File file)
Called to retrieve the information on a episode
|
IFilm |
getFilm(java.lang.String filmId,
java.net.URL url,
java.io.File filmFile)
This will get a film from the source.
|
ExtensionInfo<? extends ISource> |
getInfo()
Used to get the source information details
|
java.lang.String |
getParameter(java.lang.String key)
Used to get the value of a source parameter.
|
ISeason |
getSeason(IShow show,
int seasonNum,
java.io.File file)
This will get a season from the source.
|
IShow |
getShow(java.lang.String showId,
java.net.URL url,
java.io.File file)
This will get a show from the source.
|
IEpisode |
getSpecial(ISeason season,
int specialNumber,
java.io.File file)
This gets a special episode from the source.
|
SearchResult |
searchMedia(java.lang.String name,
java.lang.String year,
Mode mode,
java.lang.Integer part)
This is called to search the source for media details
|
void |
setMediaDirConfig(MediaDirectory dir)
Called to tell the source which media directory is been processed
|
void |
setParameter(java.lang.String key,
java.lang.String value)
Used to set source parameters.
|
IEpisode getEpisode(ISeason season, int episodeNum, java.io.File file) throws SourceException, java.net.MalformedURLException, java.io.IOException
season
- The season the episode belongs tooepisodeNum
- The number of the episodefile
- The special file if looking up a files details, or NULLSourceException
- Thrown if their is a problem retrieving the datajava.net.MalformedURLException
- Thrown if their is a problem creating URL'sjava.io.IOException
- Throw if their is a IO related problemISeason getSeason(IShow show, int seasonNum, java.io.File file) throws SourceException, java.io.IOException
show
- The show the season belongs tooseasonNum
- The number of the season that is to be fetchedfile
- The media file if looking up a files details, or NULLSourceException
- Thrown if their is a problem retrieving the datajava.io.IOException
- Thrown if their is a I/O related problem.IShow getShow(java.lang.String showId, java.net.URL url, java.io.File file) throws SourceException, java.net.MalformedURLException, java.io.IOException
showId
- The id of the show to get.url
- String url of the showfile
- The media file if looking up a files details, or NULLSourceException
- Thrown if their is a problem retrieving the datajava.net.MalformedURLException
- Thrown if their is a problem creating URL'sjava.io.IOException
- Thrown if their is a I/O related problem.IFilm getFilm(java.lang.String filmId, java.net.URL url, java.io.File filmFile) throws SourceException, java.net.MalformedURLException, java.io.IOException
filmId
- The id of the filmurl
- The URL used to lookup the filmfilmFile
- The film file if looking up a files details, or NULLSourceException
- Thrown if their is a problem retrieving the datajava.net.MalformedURLException
- Thrown if their is a problem creating URL'sjava.io.IOException
- Thrown if their is a I/O related problem.IEpisode getSpecial(ISeason season, int specialNumber, java.io.File file) throws SourceException, java.net.MalformedURLException, java.io.IOException
season
- The season the special episode belongs toospecialNumber
- The number of the special episode too getfile
- The special file if looking up a files details, or NULLSourceException
- Thrown if their is a problem retrieving the datajava.net.MalformedURLException
- Thrown if their is a problem creating URL'sjava.io.IOException
- Thrown if their is a I/O related problem.void setParameter(java.lang.String key, java.lang.String value) throws SourceException
Used to set source parameters. If the key is not supported by this source, then a SourceException
is thrown.
key
- The key of the parametervalue
- The value of the parameterSourceException
- Throw if the key is not supported by this source.java.lang.String getParameter(java.lang.String key) throws SourceException
Used to get the value of a source parameter. If the key is not supported by this source, then a SourceException
is thrown.
key
- The key of the parameterSourceException
- Throw if the key is not supported by this source.void setMediaDirConfig(MediaDirectory dir) throws SourceException
dir
- The media directorySourceException
- Thrown if their is a problem with the sourceSearchResult searchMedia(java.lang.String name, java.lang.String year, Mode mode, java.lang.Integer part) throws SourceException
name
- The search termyear
- The year to search for or empty string if not neededmode
- The mode of the searchpart
- The part number to search forSourceException
- Thrown if their is a problem with the sourceExtensionInfo<? extends ISource> getInfo()