public abstract class AbstractMediaSearcher extends java.lang.Object implements IMediaSearcher
Constructor and Description |
---|
AbstractMediaSearcher(java.util.List<ISearchStrategy> strategies)
Used to create a instance of this class
|
Modifier and Type | Method and Description |
---|---|
protected abstract SearchResult |
doSearch(java.io.File mediaFile,
java.lang.String term,
java.lang.String year,
java.lang.Integer part,
boolean useSources)
Used todo a search on the term and the year and return the result
|
SearchResult |
search(java.io.File mediaFile,
MediaDirectory mediaDir,
boolean useSources)
Used to search for a media id
|
public AbstractMediaSearcher(java.util.List<ISearchStrategy> strategies)
strategies
- The search strategies that should be usedprotected abstract SearchResult doSearch(java.io.File mediaFile, java.lang.String term, java.lang.String year, java.lang.Integer part, boolean useSources) throws java.net.MalformedURLException, java.io.IOException, SourceException, StoreException
term
- The term to search for (Usually a film name or tv show name).year
- The year of the media or null if not to be used in the searchmediaFile
- The media file we are searching foruseSources
- True to search sources, otherwise will only use storesjava.net.MalformedURLException
- Thrown if their is a URL construction problemjava.io.IOException
- Thrown if their is a IO problemSourceException
- Thrown if their is a problem searching via a sourceStoreException
public final SearchResult search(java.io.File mediaFile, MediaDirectory mediaDir, boolean useSources) throws java.net.MalformedURLException, java.io.IOException, SourceException, StoreException
search
in interface IMediaSearcher
mediaFile
- The episode file been processedmediaDir
- The root media directoryuseSources
- True to search sources, otherwise will only use storesjava.net.MalformedURLException
- Thrown if their is a problem construction URL'sjava.io.IOException
- Thrown if their is a IO problemSourceException
- Thrown if their are any source problemsStoreException
- Thrown if their is a problem related to stores