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

Ignore original REPACK tag if new better file comes along later on

This commit is contained in:
Reinhard Pointner 2019-03-12 11:39:06 +07:00
parent 8c69cd2de3
commit ab52370635

View File

@ -4,7 +4,6 @@ import static java.util.Comparator.*;
import static net.filebot.Logging.*;
import static net.filebot.MediaTypes.*;
import static net.filebot.media.MediaDetection.*;
import static net.filebot.media.XattrMetaInfo.*;
import static net.filebot.util.FileUtilities.*;
import static net.filebot.util.StringUtilities.*;
@ -32,7 +31,7 @@ public class VideoQuality implements Comparator<File> {
private final Pattern repack = releaseInfo.getRepackPattern();
private int getRepack(File f) {
return find(f.getName(), repack) || find(xattr.getOriginalName(f), repack) ? 1 : 0;
return find(f.getName(), repack) ? 1 : 0;
}
private int getResolution(File f) {
@ -43,7 +42,7 @@ public class VideoQuality implements Comparator<File> {
try (MediaCharacteristics mi = MediaCharacteristicsParser.DEFAULT.open(f)) {
return mi.getWidth() * mi.getHeight();
} catch (Exception e) {
debug.warning("Failed to read video resolution: " + e.getMessage());
debug.warning(message("Failed to read video resolution", e.getMessage()));
}
}