mirror of
https://github.com/Escartem/AnimeWwise.git
synced 2026-06-04 23:40:25 +08:00
we can now load hdiff files :pog:
This commit is contained in:
5
app.py
5
app.py
@@ -41,6 +41,7 @@ class BackgroundWorker(QObject):
|
||||
if action == "load":
|
||||
self.input = data["input"]
|
||||
self.map = data["map"]
|
||||
self.diff = data["diff"]
|
||||
if action == "extract":
|
||||
self.input = data["input"]
|
||||
self.files = data["files"]
|
||||
@@ -50,7 +51,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)
|
||||
fileStructure = self.extract.load_folder(self.map, self.input, self.diff)
|
||||
if fileStructure is None:
|
||||
self.finished.emit({"action": "error", "content": {"msg": "Nothing found !", "state": 1}})
|
||||
print("Nothing found !")
|
||||
@@ -162,7 +163,7 @@ class AnimeWwise(QMainWindow):
|
||||
|
||||
# why is all this required for threading damnit
|
||||
self.backgroundThread = QThread()
|
||||
self.backgroundWorker = BackgroundWorker("load", self.extract, {"input": self.folders["input"], "map": _map})
|
||||
self.backgroundWorker = BackgroundWorker("load", self.extract, {"input": self.folders["input"], "map": _map, "diff": self.folders["diff"]})
|
||||
self.backgroundWorker.moveToThread(self.backgroundThread)
|
||||
self.backgroundThread.started.connect(self.backgroundWorker.run)
|
||||
self.backgroundWorker.finished.connect(self.handleFinished)
|
||||
|
||||
Reference in New Issue
Block a user