* make sure to exclude file extension from any matching

This commit is contained in:
Reinhard Pointner 2015-06-27 16:48:20 +00:00
parent 97ac339eee
commit 165e0e5681
1 changed files with 3 additions and 3 deletions

View File

@ -481,7 +481,7 @@ public class MediaBindingBean {
File inferredMediaFile = getInferredMediaFile();
// consider foldername, filename and original filename
String[] filenames = new String[] { inferredMediaFile.getParentFile().getName(), inferredMediaFile.getName(), getOriginalFileName(inferredMediaFile) };
String[] filenames = new String[] { inferredMediaFile.getParentFile().getName(), getNameWithoutExtension(inferredMediaFile.getName()), getOriginalFileName(inferredMediaFile) };
// reduce false positives by removing the know titles from the name
Pattern nonGroupPattern = releaseInfo.getCustomRemovePattern(getKeywords());
@ -960,8 +960,8 @@ public class MediaBindingBean {
private String getOriginalFileName(File file) {
try {
return new MetaAttributes(file).getOriginalName();
} catch (Exception e) {
return getNameWithoutExtension(new MetaAttributes(file).getOriginalName());
} catch (Throwable e) {
return null;
}
}