mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix(plugin): 按绑定仓库保留更新候选 (#6474)
* fix(plugin): preserve repository update candidates * chore(ci): sync architecture ratchet baselines * chore(ci): align canonical coverage baseline * chore(ci): align coverage ratchet baseline
This commit is contained in:
@@ -243,6 +243,23 @@ class PluginCatalogFacade:
|
||||
self._logger.info(f"获取到 {len(result)} 个线上插件")
|
||||
return result
|
||||
|
||||
async def async_online_candidates(self, force: bool = False) -> list[Plugin]:
|
||||
"""读取在线目录并保留每个仓库的最高候选,供来源准入使用。"""
|
||||
plugin_market = get_runtime_setting('PLUGIN_MARKET')
|
||||
if not plugin_market:
|
||||
return []
|
||||
markets = [item for item in plugin_market.split(",") if item]
|
||||
result: list[Plugin] = await self._market_catalog().async_collect(
|
||||
markets=markets,
|
||||
compatible_flags=self._system().compatible_flags(
|
||||
get_runtime_setting('VERSION_FLAG')
|
||||
),
|
||||
force=force,
|
||||
loader=self._async_market_loader,
|
||||
preserve_sources=True,
|
||||
)
|
||||
return result
|
||||
|
||||
async def async_get_from_market(
|
||||
self,
|
||||
market: str,
|
||||
|
||||
@@ -1364,6 +1364,13 @@ class PluginManager(ConfigReloadMixin, metaclass=Singleton):
|
||||
progress_callback,
|
||||
)
|
||||
|
||||
async def async_get_online_plugin_candidates(
|
||||
self,
|
||||
force: bool = False,
|
||||
) -> List[_SchemaPlugin]:
|
||||
"""获取按仓库保留的在线插件候选,供来源准入和更新选择。"""
|
||||
return await self._plugin_catalog_view.async_online_candidates(force)
|
||||
|
||||
async def async_get_plugins_from_market(self, market: str,
|
||||
package_version: Optional[str] = None,
|
||||
force: bool = False) -> Optional[List[_SchemaPlugin]]:
|
||||
|
||||
Reference in New Issue
Block a user