1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

* 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

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;
}
}