mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-04 16:35:08 -05:00
* improve subtitle/nfo matching here as well
This commit is contained in:
parent
7cc54fc59e
commit
faea58b7c7
@ -517,11 +517,11 @@ public class MediaBindingBean {
|
||||
|
||||
if (SUBTITLE_FILES.accept(mediaFile) || getDefaultFilter("application/nfo").accept(mediaFile)) {
|
||||
// file is a subtitle
|
||||
String baseName = stripReleaseInfo(FileUtilities.getName(mediaFile).toLowerCase());
|
||||
String baseName = stripReleaseInfo(FileUtilities.getName(mediaFile)).toLowerCase();
|
||||
|
||||
// find corresponding movie file
|
||||
for (File movieFile : mediaFile.getParentFile().listFiles(VIDEO_FILES)) {
|
||||
if (baseName.startsWith(stripReleaseInfo(FileUtilities.getName(movieFile)).toLowerCase())) {
|
||||
if (stripReleaseInfo(FileUtilities.getName(movieFile)).toLowerCase().startsWith(baseName)) {
|
||||
return movieFile;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user