* fixfix
This commit is contained in:
parent
859fba6f1b
commit
4c6a9a4856
|
@ -705,7 +705,7 @@ public class CmdlineOperations implements CmdlineInterface {
|
||||||
List<SearchResult> probableMatches = findProbableMatches(query, searchResults, strict);
|
List<SearchResult> probableMatches = findProbableMatches(query, searchResults, strict);
|
||||||
|
|
||||||
if (probableMatches.isEmpty() || (strict && probableMatches.size() != 1)) {
|
if (probableMatches.isEmpty() || (strict && probableMatches.size() != 1)) {
|
||||||
throw new Exception("Failed to auto-select search result: " + probableMatches);
|
throw new Exception("Failed to auto-select search result: " + searchResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
// return first and only value
|
// return first and only value
|
||||||
|
|
|
@ -157,15 +157,15 @@ def parseEpisodeNumber(path, strict = true) {
|
||||||
}
|
}
|
||||||
|
|
||||||
def parseDate(path) {
|
def parseDate(path) {
|
||||||
return new DateMetric().parse(input)
|
return new DateMetric().parse(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
def detectSeriesName(files, locale = Locale.ENGLISH) {
|
def detectSeriesName(files, locale = Locale.ENGLISH) {
|
||||||
def names = MediaDetection.detectSeriesNames(files.findAll { it.isVideo() || it.isSubtitle() }, locale)
|
def names = MediaDetection.detectSeriesNames(files instanceof Collection ? files : [new File(files.toString())], locale)
|
||||||
return names == null || names.isEmpty() ? null : names.toList()[0]
|
return names == null || names.isEmpty() ? null : names.toList()[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
def detectMovie(movieFile, locale = Locale.ENGLISH, strict = true) {
|
def detectMovie(movieFile, strict = true, locale = Locale.ENGLISH) {
|
||||||
def movies = MediaDetection.detectMovie(movieFile, OpenSubtitles, TheMovieDB, locale, strict)
|
def movies = MediaDetection.detectMovie(movieFile, OpenSubtitles, TheMovieDB, locale, strict)
|
||||||
return movies == null || movies.isEmpty() ? null : movies.toList()[0]
|
return movies == null || movies.isEmpty() ? null : movies.toList()[0]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue