mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-21 15:28:52 -05:00
Fine-tune CLI movie selection and bring it more inline with GUI behaviour
This commit is contained in:
parent
dc5b35d3f3
commit
c55b24f480
@ -502,7 +502,7 @@ public class CmdlineOperations implements CmdlineInterface {
|
||||
}
|
||||
|
||||
protected Movie selectMovie(String query, Collection<Movie> options) throws Exception {
|
||||
query = query.toLowerCase();
|
||||
query = normalizePunctuation(query).toLowerCase();
|
||||
|
||||
// auto-select perfect match
|
||||
for (Movie movie : options) {
|
||||
@ -512,7 +512,8 @@ public class CmdlineOperations implements CmdlineInterface {
|
||||
}
|
||||
}
|
||||
|
||||
return selectSearchResult(query, options, false, false, false, 1).stream().findFirst().orElse(null);
|
||||
List<Movie> selection = selectSearchResult(query, options, false, false, false, 1);
|
||||
return selection.isEmpty() ? null : selection.get(0);
|
||||
}
|
||||
|
||||
public List<File> renameMusic(Collection<File> files, RenameAction renameAction, ConflictAction conflictAction, File outputDir, ExpressionFileFormat format, List<MusicIdentificationService> services, ExecCommand exec) throws Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user