1
0
mirror of https://github.com/Escartem/AnimeWwise.git synced 2026-06-04 23:40:25 +08:00

fix subfolders load

This commit is contained in:
Escartem
2025-01-06 10:00:20 +01:00
parent 092150ee7a
commit 55cfbc7bda
3 changed files with 15 additions and 13 deletions

5
app.py
View File

@@ -42,6 +42,7 @@ class BackgroundWorker(QObject):
self.extract = extract
if action == "load":
self.base = data["base"]
self.input = data["input"]
self.map = data["map"]
self.diff = data["diff"]
@@ -54,7 +55,7 @@ class BackgroundWorker(QObject):
def run(self):
if self.action == "load":
print("Loading files and mapping if necessary...")
fileStructure = self.extract.load_folder(self.map, self.input, self.diff, progress=self.progress.emit)
fileStructure = self.extract.load_folder(self.map, self.input, self.diff, self.base, progress=self.progress.emit)
if fileStructure is None:
self.finished.emit({"action": "error", "content": {"msg": "Nothing found !", "state": 1}})
print("Nothing found !")
@@ -270,7 +271,7 @@ class AnimeWwise(QMainWindow):
# why is all this required for threading damnit
self.backgroundThread = QThread()
self.backgroundWorker = BackgroundWorker("load", self.extract, {"input": files, "map": _map, "diff": self.folders["diff"]})
self.backgroundWorker = BackgroundWorker("load", self.extract, {"base": self.folders["input"], "input": files, "map": _map, "diff": self.folders["diff"]})
self.backgroundWorker.moveToThread(self.backgroundThread)
self.backgroundThread.started.connect(self.backgroundWorker.run)
self.backgroundWorker.finished.connect(self.handleFinished)