From 95ff15d4756012b74197161f78d632108aee7dcf Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 1 Apr 2013 10:17:20 +0000 Subject: [PATCH] * fix various possible movie detection issues TEST-DATA: [www.Cpasbien.me] Django.Unchained.2012.FRENCH.BDRip.XviD-AYMO\[www.Cpasbien.me] aymo-django.xvid.cd1.avi --- source/net/sourceforge/filebot/media/MediaDetection.java | 4 ++-- source/net/sourceforge/filebot/media/ReleaseInfo.java | 5 ++--- website/data/query-blacklist.txt | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/net/sourceforge/filebot/media/MediaDetection.java b/source/net/sourceforge/filebot/media/MediaDetection.java index 315572ac..f10e8469 100644 --- a/source/net/sourceforge/filebot/media/MediaDetection.java +++ b/source/net/sourceforge/filebot/media/MediaDetection.java @@ -629,12 +629,12 @@ public class MediaDetection { } } - return null; + return movieFile.getParentFile(); } public static Movie checkMovie(File file) throws Exception { - List matches = file != null ? matchMovieName(singleton(file.getName()), false, 2) : null; + List matches = file != null ? matchMovieName(singleton(file.getName()), false, 4) : null; return matches != null && matches.size() > 0 ? matches.get(0) : null; } diff --git a/source/net/sourceforge/filebot/media/ReleaseInfo.java b/source/net/sourceforge/filebot/media/ReleaseInfo.java index bbd9fe71..4b56ac52 100644 --- a/source/net/sourceforge/filebot/media/ReleaseInfo.java +++ b/source/net/sourceforge/filebot/media/ReleaseInfo.java @@ -139,7 +139,7 @@ public class ReleaseInfo { List output = new ArrayList(items.size()); for (String it : items) { it = strict ? clean(it, stopwords) : substringBefore(it, stopwords); - it = clean(it, blacklist); + it = normalizePunctuation(clean(it, blacklist)); // ignore empty values if (it.length() > 0) { @@ -155,8 +155,7 @@ public class ReleaseInfo { for (Pattern it : blacklisted) { item = it.matcher(item).replaceAll(""); } - - return normalizePunctuation(item); + return item; } diff --git a/website/data/query-blacklist.txt b/website/data/query-blacklist.txt index 2f7bf22b..f1541574 100644 --- a/website/data/query-blacklist.txt +++ b/website/data/query-blacklist.txt @@ -227,6 +227,7 @@ unrated unrated.edition UsaBit.com video[s]? +www.Cpasbien.me www[.][\w-.]+[.](com|net|tk|ro|cd) xRipp XtremeDoN