* simplify error logs
This commit is contained in:
parent
327ea294c1
commit
3dd87924f1
|
@ -310,14 +310,14 @@ public class MediaDetection {
|
||||||
names.add(it.getName());
|
names.add(it.getName());
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to lookup info by id: " + e.getMessage(), e);
|
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to lookup info by id: " + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// try to detect series name via known patterns
|
// try to detect series name via known patterns
|
||||||
try {
|
try {
|
||||||
names.addAll(matchSeriesByDirectMapping(files));
|
names.addAll(matchSeriesByDirectMapping(files));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to match direct mappings: " + e.getMessage(), e);
|
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to match direct mappings: " + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// strict series name matcher for recognizing 1x01 patterns
|
// strict series name matcher for recognizing 1x01 patterns
|
||||||
|
@ -377,7 +377,7 @@ public class MediaDetection {
|
||||||
names.addAll(matches);
|
names.addAll(matches);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to match folder structure: " + e.getMessage(), e);
|
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to match folder structure: " + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// match common word sequence and clean detected word sequence from unwanted elements
|
// match common word sequence and clean detected word sequence from unwanted elements
|
||||||
|
@ -425,7 +425,7 @@ public class MediaDetection {
|
||||||
priorityMatchSet.addAll(stripReleaseInfo(matches, false));
|
priorityMatchSet.addAll(stripReleaseInfo(matches, false));
|
||||||
matches = stripBlacklistedTerms(priorityMatchSet);
|
matches = stripBlacklistedTerms(priorityMatchSet);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to clean matches: " + e.getMessage(), e);
|
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to clean matches: " + e);
|
||||||
}
|
}
|
||||||
names.addAll(matches);
|
names.addAll(matches);
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ public class MediaDetection {
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// can't load movie index, just try again next time
|
// can't load movie index, just try again next time
|
||||||
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Failed to load series index: " + e.getMessage(), e);
|
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Failed to load series index: " + e);
|
||||||
|
|
||||||
// rely on online search
|
// rely on online search
|
||||||
return emptyList();
|
return emptyList();
|
||||||
|
@ -482,7 +482,7 @@ public class MediaDetection {
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// can't load movie index, just try again next time
|
// can't load movie index, just try again next time
|
||||||
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Failed to load anime index: " + e.getMessage(), e);
|
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Failed to load anime index: " + e);
|
||||||
|
|
||||||
// rely on online search
|
// rely on online search
|
||||||
return emptyList();
|
return emptyList();
|
||||||
|
@ -858,7 +858,7 @@ public class MediaDetection {
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// can't load movie index, just try again next time
|
// can't load movie index, just try again next time
|
||||||
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Failed to load movie index: " + e.getMessage(), e);
|
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Failed to load movie index: " + e);
|
||||||
|
|
||||||
// if we can't use internal index we can only rely on online search
|
// if we can't use internal index we can only rely on online search
|
||||||
return emptyList();
|
return emptyList();
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class CachedXmlResource extends AbstractCachedResource<String, String> {
|
||||||
try {
|
try {
|
||||||
return WebRequest.getDocument(get());
|
return WebRequest.getDocument(get());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new IOException("Error while loading XML resource: " + e.getMessage(), e);
|
throw new IOException("Error while loading XML resource: " + getResourceLocation(resource));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public class CachedXmlResource extends AbstractCachedResource<String, String> {
|
||||||
try {
|
try {
|
||||||
reader.parse(new InputSource(new StringReader(data)));
|
reader.parse(new InputSource(new StringReader(data)));
|
||||||
} catch (SAXException e) {
|
} catch (SAXException e) {
|
||||||
throw new IOException("Malformed XML: " + getResourceLocation(resource), e);
|
throw new IOException("Malformed XML: " + getResourceLocation(resource));
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
Loading…
Reference in New Issue