From 86723cb3bf55dcef2171e39a49bc461f0a81487e Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 30 Apr 2013 11:20:28 +0000 Subject: [PATCH] * make sure the user.home is never considered a movie folder --- .../sourceforge/filebot/media/MediaDetection.java | 12 ++++++++++++ website/data/query-blacklist.txt | 1 + 2 files changed, 13 insertions(+) diff --git a/source/net/sourceforge/filebot/media/MediaDetection.java b/source/net/sourceforge/filebot/media/MediaDetection.java index e7722639..452abbd1 100644 --- a/source/net/sourceforge/filebot/media/MediaDetection.java +++ b/source/net/sourceforge/filebot/media/MediaDetection.java @@ -632,6 +632,18 @@ public class MediaDetection { public static File guessMovieFolder(File movieFile) throws Exception { + File folder = guessMovieFolderWithoutSanity(movieFile); + + // perform sanity checks + if (folder == null || folder.equals(new File(System.getProperty("user.home")))) { + return null; + } + + return folder; + } + + + private static File guessMovieFolderWithoutSanity(File movieFile) throws Exception { // special case for folder mode if (movieFile.isDirectory()) { File f = movieFile; diff --git a/website/data/query-blacklist.txt b/website/data/query-blacklist.txt index 1db1615e..463dcbef 100644 --- a/website/data/query-blacklist.txt +++ b/website/data/query-blacklist.txt @@ -112,6 +112,7 @@ DDLValley DDLValley.eu ded Demonoid +Descargas Director's.Cut Directors.Cut DKsubs