Esempio n. 1
0
    def search_files(self, search, path):
        files = []
        keywords = search.split()  # Split on whitespace
        for file_name in file_handler.get_subdirectories(path):
            file_path = path + '/' + file_name

            match = self.__match_file(keywords, file_name)
            if match:
                logger.log('Found file/folder: ' + file_path)
                files.append(file_path)

        if not files:
            logger.log('No matching files found: ' + search)
        return files
Esempio n. 2
0
 def __find_show_name(self, root_directory, searching_show_name):
     for directory in file_handler.get_subdirectories(root_directory):
         if directory.lower().strip() == searching_show_name.lower().strip():
             return directory
     return None