public class MediaSearchOptions extends Object
Constructor and Description |
---|
MediaSearchOptions(MediaType type) |
MediaSearchOptions(MediaType type,
String query) |
Modifier and Type | Method and Description |
---|---|
CountryCode |
getCountry()
Get the CountryCode for the search
|
int |
getIdAsInt(String providerId)
Get the id for the given provider id as int
|
Integer |
getIdAsInteger(String providerId)
Get the id for the given provider id as Integer
|
int |
getIdAsIntOrDefault(String providerId,
int defaultValue)
Get the id for the given provider id as int or the chosen default value
|
String |
getIdAsString(String providerId)
Get the id for the given provider id as String
|
String |
getImdbId()
Get the imdb id - just a convenience method to get the Id for the provider imdb
|
Locale |
getLanguage()
Get the language for the search
|
MediaType |
getMediaType()
Get the media type for this options
|
String |
getQuery()
Get the search query
|
int |
getTmdbId()
Get the tmdb id - just a convenience method to get the Id for the provider tmdb
|
int |
getYear()
Get the year
|
void |
setCountry(CountryCode country)
Set the CountryCode for the search
|
void |
setId(String providerId,
String id)
Set an media id for a provider id
|
void |
setIds(Map<String,Object> newIds)
set die provider ids for the search
|
void |
setImdbId(String imdbId)
Set the imdb id - just a convenience method to set the Id for the provider imdb
|
void |
setLanguage(Locale language)
Set the language for the search
|
void |
setQuery(String query)
Set the search query
|
void |
setTmdbId(int tmdbId)
Set the itdb id - just a convenience method to set the Id for the provider tmdb
|
void |
setYear(int year)
Set the year
|
String |
toString() |
protected MediaType type
public MediaSearchOptions(MediaType type)
public MediaType getMediaType()
public String getQuery()
public void setQuery(String query)
query
- the search querypublic int getYear()
public void setYear(int year)
year
- the yearpublic String getIdAsString(String providerId)
providerId
- the provider Idpublic Integer getIdAsInteger(String providerId)
providerId
- the provider Idpublic int getIdAsInt(String providerId)
providerId
- the provider Idpublic int getIdAsIntOrDefault(String providerId, int defaultValue)
providerId
- the provider Idpublic void setId(String providerId, String id)
providerId
- the provider idid
- the media idpublic String getImdbId()
public int getTmdbId()
public void setImdbId(String imdbId)
imdbId
- the imdb idpublic void setTmdbId(int tmdbId)
tmdbId
- the tmdb idpublic Locale getLanguage()
public void setLanguage(Locale language)
language
- a locale for the right languagepublic CountryCode getCountry()
public void setCountry(CountryCode country)
country
- the CountryCodeCopyright © 2012–2019 tinyMediaManager. All rights reserved.