public class MetadataUtil extends Object
Modifier and Type | Method and Description |
---|---|
static float |
calculateScore(String searchTitle,
String matchTitle)
Return the best score for a title when compared to the search string.
|
static String |
getImdbIdViaTmdbId(int tmdbId)
gets the imdb id via tmdb id
|
static boolean |
isValidImdbId(String imdbId)
Checks if is valid imdb id.
|
static int |
parseInt(String intAsString)
parse a String for its integer value
this method can parse normal integer values (e.g. |
static String |
parseRunningTime(String in,
String regex)
Parses the running time.
|
static String |
removeNonSearchCharacters(String s)
For the purposes of searching it will, keep only alpha numeric characters and '&.
|
public static float calculateScore(String searchTitle, String matchTitle)
searchTitle
- the search titlematchTitle
- the match titlepublic static String parseRunningTime(String in, String regex)
in
- the inregex
- the regexpublic static String removeNonSearchCharacters(String s)
s
- the spublic static boolean isValidImdbId(String imdbId)
imdbId
- the imdb idpublic static int parseInt(String intAsString) throws NumberFormatException
intAsString
- the String to be parsedNumberFormatException
- an exception if none of the parsing methods workedpublic static String getImdbIdViaTmdbId(int tmdbId)
tmdbId
- the tmdb idCopyright © 2012–2019 tinyMediaManager. All rights reserved.