public class MediaSearcher
extends java.lang.Object
Constructor and Description |
---|
MediaSearcher(Controller controller)
The constructor
|
Modifier and Type | Method and Description |
---|---|
protected static SearchResult |
findFilm(MediaDirectory dir,
java.io.File file,
boolean useSources) |
static IFilm |
getFilm(MediaDirectory dir,
java.io.File file,
boolean useSources,
boolean cacheIfNew)
Used to lookup film information
|
static java.lang.Integer |
getFilmPart(MediaDirectory dir,
java.io.File file,
IFilm film)
Used to get the part number of a film
|
static IEpisode |
getTVEpisode(MediaDirectory dir,
java.io.File file,
boolean useSources,
boolean cacheIfNew)
Used to lookup TV episode information
|
MediaSearchResult |
lookupMedia(java.io.File mediaFile,
boolean useSources,
boolean cacheIfNew)
Used to lookup media file information
|
public MediaSearcher(Controller controller) throws ConfigException
controller
- The media controllerConfigException
- Thrown if their is a problem reading the configurationpublic MediaSearchResult lookupMedia(java.io.File mediaFile, boolean useSources, boolean cacheIfNew) throws ActionException
mediaFile
- The media fileuseSources
- If true, then information is fetched remotely as well as locallycacheIfNew
- If true, will cache results in store if they were not in the store beforeActionException
- Thrown if their are any problems.public static IFilm getFilm(MediaDirectory dir, java.io.File file, boolean useSources, boolean cacheIfNew) throws ActionException
dir
- The media directoryfile
- The media fileuseSources
- If true, then information is fetched remotely as well as locallycacheIfNew
- If true, will cache results in store if they were not in the store beforeActionException
- Thrown if their are any problems.protected static SearchResult findFilm(MediaDirectory dir, java.io.File file, boolean useSources) throws ActionException
ActionException
public static IEpisode getTVEpisode(MediaDirectory dir, java.io.File file, boolean useSources, boolean cacheIfNew) throws ActionException
dir
- The media directoryfile
- The media fileuseSources
- If true, then information is fetched remotely as well as locallycacheIfNew
- If true, will cache results in store if they were not in the store beforeActionException
- Thrown if their are any problems.public static java.lang.Integer getFilmPart(MediaDirectory dir, java.io.File file, IFilm film)
dir
- The media directory of the filmfile
- The media filefilm
- The film information