cleanup and rename provider to plugin
This commit is contained in:
+3
-3
@@ -63,7 +63,7 @@ class _CommandDependencies:
|
||||
|
||||
def get_plugin(self, name: str) -> Optional[Any]:
|
||||
"""Cached plugin lookup by name."""
|
||||
from ProviderCore.registry import get_plugin
|
||||
from PluginCore.registry import get_plugin
|
||||
|
||||
norm_name = str(name or "").strip().lower()
|
||||
if not norm_name:
|
||||
@@ -77,7 +77,7 @@ class _CommandDependencies:
|
||||
|
||||
def get_plugin_with_capability(self, name: str, capability: str) -> Optional[Any]:
|
||||
"""Cached plugin lookup with capability check."""
|
||||
from ProviderCore.registry import get_plugin_with_capability
|
||||
from PluginCore.registry import get_plugin_with_capability
|
||||
|
||||
norm_name = str(name or "").strip().lower()
|
||||
if not norm_name:
|
||||
@@ -2336,7 +2336,7 @@ class Add_File(Cmdlet):
|
||||
delete_after: bool,
|
||||
) -> int:
|
||||
"""Handle uploading via an upload plugin (e.g. 0x0)."""
|
||||
from ProviderCore.registry import (
|
||||
from PluginCore.registry import (
|
||||
get_plugin_with_capability,
|
||||
list_plugin_names_with_capability,
|
||||
list_plugins_with_capability,
|
||||
|
||||
@@ -13,7 +13,7 @@ from typing import Any, Dict, List, Sequence, Set
|
||||
from urllib.parse import parse_qs, urlparse
|
||||
|
||||
from SYS.logger import log
|
||||
from ProviderCore.registry import get_plugin
|
||||
from PluginCore.registry import get_plugin
|
||||
from SYS.item_accessors import get_http_url, get_sha256_hex, get_store_name
|
||||
from SYS.utils import extract_hydrus_hash_from_url
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
from SYS.logger import debug, log
|
||||
from ProviderCore.registry import get_plugin
|
||||
from PluginCore.registry import get_plugin
|
||||
from Store import Store
|
||||
from .. import _shared as sh
|
||||
from SYS import pipeline as ctx
|
||||
|
||||
@@ -992,8 +992,8 @@ class Download_File(Cmdlet):
|
||||
def _load_provider_registry() -> Dict[str, Any]:
|
||||
"""Lightweight accessor for plugin helpers without hard dependencies."""
|
||||
try:
|
||||
from ProviderCore import registry as provider_registry # type: ignore
|
||||
from ProviderCore.base import SearchResult # type: ignore
|
||||
from PluginCore import registry as provider_registry # type: ignore
|
||||
from PluginCore.base import SearchResult # type: ignore
|
||||
|
||||
return {
|
||||
"get_plugin": getattr(provider_registry, "get_plugin", None),
|
||||
|
||||
@@ -154,7 +154,7 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
|
||||
|
||||
if urls_to_download and len(urls_to_download) >= 2:
|
||||
try:
|
||||
from ProviderCore.registry import get_plugin_for_url
|
||||
from PluginCore.registry import get_plugin_for_url
|
||||
|
||||
expanded: List[Dict[str, Any]] = []
|
||||
downloaded_any = False
|
||||
|
||||
@@ -15,7 +15,7 @@ from urllib.parse import urlparse, parse_qs, unquote, urljoin
|
||||
|
||||
from SYS.logger import log, debug, debug_panel
|
||||
from SYS.payload_builders import build_file_result_payload, normalize_file_extension
|
||||
from ProviderCore.registry import get_plugin_with_capability, list_plugins_with_capability
|
||||
from PluginCore.registry import get_plugin_with_capability, list_plugins_with_capability
|
||||
from SYS.rich_display import (
|
||||
show_plugin_config_panel,
|
||||
show_store_config_panel,
|
||||
|
||||
Reference in New Issue
Block a user