diff --git a/couchpotato/core/plugins/scanner/main.py b/couchpotato/core/plugins/scanner/main.py index 136a196..0a220bc 100644 --- a/couchpotato/core/plugins/scanner/main.py +++ b/couchpotato/core/plugins/scanner/main.py @@ -95,6 +95,8 @@ class Scanner(Plugin): def scanFilesToLibrary(self, folder = None, files = None): + folder = os.path.normpath(folder) + groups = self.scan(folder = folder, files = files) for group in groups.itervalues(): @@ -103,6 +105,8 @@ class Scanner(Plugin): def scanFolderToLibrary(self, folder = None, newer_than = None, simple = True): + folder = os.path.normpath(folder) + if not os.path.isdir(folder): return @@ -129,6 +133,8 @@ class Scanner(Plugin): def scan(self, folder = None, files = [], simple = False): + folder = os.path.normpath(folder) + if not folder or not os.path.isdir(folder): log.error('Folder doesn\'t exists: %s' % folder) return {}