Fix regression issue.
https://www.filebot.net/forums/viewtopic.php?f=6&t=4023
This commit is contained in:
parent
4f4f90ecdc
commit
d3df8cd4e4
|
@ -32,7 +32,6 @@ import java.util.List;
|
|||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
|
@ -384,8 +383,8 @@ public class CmdlineOperations implements CmdlineInterface {
|
|||
}
|
||||
}
|
||||
}
|
||||
} catch (NoSuchElementException e) {
|
||||
log.warning("Failed to grep IMDbID: " + nfo.getName());
|
||||
} catch (Exception e) {
|
||||
log.log(Level.WARNING, "Failed to grep IMDbID: " + nfo.getName(), e);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1216,9 +1216,8 @@ public class MediaDetection {
|
|||
}
|
||||
|
||||
public static Movie grepMovie(File nfo, MovieIdentificationService resolver, Locale locale) throws Exception {
|
||||
String text = readTextFile(nfo);
|
||||
int imdbId = grepImdbId(text).get(0);
|
||||
return resolver.getMovieDescriptor(new Movie(imdbId), locale);
|
||||
List<Integer> imdbId = grepImdbId(readTextFile(nfo));
|
||||
return imdbId.isEmpty() ? null : resolver.getMovieDescriptor(new Movie(imdbId.get(0)), locale);
|
||||
}
|
||||
|
||||
public static SeriesInfo grepSeries(File nfo, Locale locale) throws Exception {
|
||||
|
|
|
@ -142,8 +142,8 @@ class MovieMatcher implements AutoCompleteMatcher {
|
|||
}
|
||||
}
|
||||
}
|
||||
} catch (NoSuchElementException e) {
|
||||
debug.log(Level.WARNING, "Failed to grep IMDbID: " + nfo.getName());
|
||||
} catch (Exception e) {
|
||||
debug.log(Level.WARNING, "Failed to grep IMDbID: " + nfo.getName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue