mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-25 01:08:52 -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)) {
|
if (SUBTITLE_FILES.accept(mediaFile) || getDefaultFilter("application/nfo").accept(mediaFile)) {
|
||||||
// file is a subtitle
|
// file is a subtitle
|
||||||
String baseName = stripReleaseInfo(FileUtilities.getName(mediaFile).toLowerCase());
|
String baseName = stripReleaseInfo(FileUtilities.getName(mediaFile)).toLowerCase();
|
||||||
|
|
||||||
// find corresponding movie file
|
// find corresponding movie file
|
||||||
for (File movieFile : mediaFile.getParentFile().listFiles(VIDEO_FILES)) {
|
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;
|
return movieFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user