feat(media): add native IMDb source module

This commit is contained in:
jxxghp
2026-08-22 11:22:59 +08:00
parent b8c79e1a1e
commit 1a7c3cfff8
12 changed files with 1847 additions and 13 deletions
@@ -490,7 +490,7 @@ from app.runtime.extensions.host_module_adapter import (
registry = build_host_module_registry()
specs = registry.list_specs()
assert len(specs) == 37
assert len(specs) == 38
adapter = HostModuleAdapter()
lifecycle_events = []
@@ -537,7 +537,7 @@ from app.schemas.types import EventType
registry = build_host_module_registry()
specs = registry.list_specs()
assert len(specs) == 37
assert len(specs) == 38
spec_by_id = {spec.id: spec for spec in specs}
events = {spec.id: [] for spec in specs}
@@ -704,7 +704,7 @@ from app.runtime.extensions.host_module_adapter import (
registry = build_host_module_registry()
specs = registry.list_specs()
assert len(specs) == 37
assert len(specs) == 38
configured_specs = tuple(
spec for spec in specs
if spec.activation is ActivationPolicy.WHEN_CONFIGURED
@@ -800,12 +800,12 @@ from app.application.module import configure_module_runtime
configure_module_runtime(lambda: ModuleManager())
manager = ModuleManager()
assert len(manager.list_specs()) == 37
assert len(manager.list_specs()) == 38
assert manager.get_specs() == manager.list_specs()
from app.api.endpoints.system import modulelist
response = modulelist(None)
assert len(response.data["modules"]) == 37
assert len(response.data["modules"]) == 38
heavy_prefixes = (
"lark_oapi",
@@ -913,7 +913,7 @@ from app.runtime.extensions.module_manager import ModuleManager
manager = ModuleManager()
modules = manager.get_modules()
assert len(modules) == len(manager.list_specs()) == 37
assert len(modules) == len(manager.list_specs()) == 38
for spec in manager.list_specs():
implementation = modules[spec.id]
assert implementation.get_name() == spec.metadata["name"]