mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-03 12:20:05 +08:00
refactor(profile): separate subscription refresh and scheduling policy
Separate download and scheduling policy from the subscription use case while retaining the existing write path.
This commit is contained in:
@@ -5,7 +5,7 @@ use crate::core::notify::NoticeStatus;
|
||||
use crate::utils::window_manager::WindowManager;
|
||||
use crate::{
|
||||
config::{
|
||||
Config, IProfiles, PrfItem, PrfOption, fetch_remote_profile,
|
||||
Config, IProfiles, PrfItem, PrfOption, build_remote_profile,
|
||||
profiles::{
|
||||
PROFILE_WRITE_LOCK, cleanup_profile_files, profiles_append_item_safe,
|
||||
profiles_append_item_with_filedata_safe, profiles_patch_item_safe, profiles_reorder_safe,
|
||||
@@ -72,7 +72,7 @@ pub async fn enhance_profiles() -> CmdResult<ValidationOutcome> {
|
||||
#[tracing::instrument(skip_all, level = "info", fields(url = %help::mask_url(&url), uid = tracing::field::Empty))]
|
||||
#[specta::specta]
|
||||
pub async fn import_profile(url: std::string::String, option: Option<PrfOption>) -> CmdResult {
|
||||
let item = &mut match fetch_remote_profile(&url, None, None, option.as_ref()).await {
|
||||
let item = &mut match build_remote_profile(&url, None, None, option.as_ref()).await {
|
||||
Ok(it) => it,
|
||||
Err(e) => {
|
||||
logging!(error, Type::Cmd, "[导入订阅] 下载失败: {e:#}");
|
||||
|
||||
Reference in New Issue
Block a user