mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 08:48:51 -05:00
* error handling
This commit is contained in:
parent
8418389e77
commit
67e6dcf196
@ -171,8 +171,13 @@ public class ArgumentProcessor {
|
||||
seriesNames = singleton(query);
|
||||
}
|
||||
|
||||
// fetch episode data
|
||||
Set<Episode> episodes = fetchEpisodeSet(db, seriesNames, locale, strict);
|
||||
|
||||
if (episodes.isEmpty()) {
|
||||
throw new RuntimeException("Failed to fetch episode data");
|
||||
}
|
||||
|
||||
// similarity metrics for matching
|
||||
SimilarityMetric[] sequence;
|
||||
if (strict) {
|
||||
@ -656,7 +661,7 @@ public class ArgumentProcessor {
|
||||
|
||||
private void printEpisodeList(String query, ExpressionFormat format, String db, Locale locale) throws Exception {
|
||||
// find series on the web and fetch episode list
|
||||
EpisodeListProvider service = db != null ? getEpisodeListProvider(db) : TVRage;
|
||||
EpisodeListProvider service = (db == null) ? TVRage : getEpisodeListProvider(db);
|
||||
SearchResult hit = selectSearchResult(query, service.search(query, locale), false);
|
||||
|
||||
Analytics.trackEvent("CLI", "PrintEpisodeList", hit.getName());
|
||||
|
Loading…
Reference in New Issue
Block a user