Skip to content

The only downloader you need. 下载器的集大成者。

fix: 修复功能包重构遗漏

XiaoYouChRb2fff7a13e53
diff --git a/app/services/core_service.py b/app/services/core_service.py
index 1e1ca67a..02c8daad 100644
--- a/app/services/core_service.py
+++ b/app/services/core_service.py
@@ -37,7 +37,7 @@ class CoreService(QThread):
self.tasks: set[Task] = set()
self.waitingTasks: list[Task] = []
self.runningTasks: dict[str, asyncio.Task] = {}
- self._pendingCallbacks: Dict[str, Callable[[dict, str | None], Coroutine | None]] = {}
+ self._pendingCallbacks: Dict[str, Callable[[Any, str | None], Coroutine | None]] = {}
cfg.maxTaskNum.valueChanged.connect(lambda _: self._rebalanceSoon())
def sendNotification(self, task: Task):
diff --git a/app/view/windows/main_window.py b/app/view/windows/main_window.py
index ca85373c..bccbebaf 100644
--- a/app/view/windows/main_window.py
+++ b/app/view/windows/main_window.py
@@ -213,7 +213,7 @@ class MainWindow(MSFluentWindow):
if not parsed.scheme or not parsed.netloc or parsed.geturl() != url:
continue
- if featureService.canHandle(url):
+ if featureService.matches(url):
urls.append(url)
return urls
diff --git a/features/jack_yao/pack.py b/features/jack_yao/pack.py
index 7c265a9f..678b0f8b 100644
--- a/features/jack_yao/pack.py
+++ b/features/jack_yao/pack.py
@@ -30,8 +30,9 @@ if TYPE_CHECKING:
class JackYaoPack(FeaturePack):
+ packId = "jack_yao"
- def load(self, mainWindow:"MainWindow"):
+ def setup(self, mainWindow:"MainWindow"):
mainWindow.resourceInterface = ResourceInterface()
mainWindow.addSubInterface(mainWindow.resourceInterface, FluentIcon.CLOUD_DOWNLOAD, "资源下载")