mirror of
https://github.com/simon987/Simple-Incremental-Search-Tool.git
synced 2025-12-16 00:29:05 +00:00
Added navbar and updated thumbnail generator
This commit is contained in:
10
crawler.py
10
crawler.py
@@ -97,7 +97,7 @@ class TaskManager:
|
||||
self.current_process.start()
|
||||
|
||||
def execute_crawl(self, path: str, counter: Value, done: Value, directory: int):
|
||||
c = Crawler([GenericFileParser([Md5CheckSumCalculator()], ExtensionMimeGuesser())])
|
||||
c = Crawler([GenericFileParser([], ExtensionMimeGuesser())])
|
||||
c.crawl(path, counter)
|
||||
|
||||
# todo: create indexer inside the crawler and index every X files
|
||||
@@ -108,17 +108,13 @@ class TaskManager:
|
||||
|
||||
docs = list(Search("changeme").get_all_documents(dir_id))
|
||||
|
||||
print(docs) #todo remove
|
||||
|
||||
total_files.value = len(docs)
|
||||
|
||||
tn_generator = ThumbnailGenerator(300) # todo get from config
|
||||
|
||||
|
||||
tn_generator = ThumbnailGenerator(275) # todo get from config
|
||||
tn_generator.generate_all(docs, os.path.join("thumbnails", str(dir_id)), counter)
|
||||
|
||||
done.value = 1
|
||||
|
||||
|
||||
def cancel_task(self):
|
||||
self.current_task = None
|
||||
self.current_process.terminate()
|
||||
|
||||
Reference in New Issue
Block a user