调整,音乐模块

This commit is contained in:
zhongluofeng
2026-09-12 11:05:26 +08:00
parent 27ad5d89a5
commit d702ed0d31
71 changed files with 13647 additions and 387 deletions
+58 -2
View File
@@ -6,6 +6,7 @@ mod download_engine;
mod logger;
mod mihomo_manager;
mod monitor_kernel;
mod music;
mod network_monitor;
mod osd_window;
mod process_manager;
@@ -41,6 +42,17 @@ use monitor_kernel::{
monitor_set_hardware_config, monitor_start, monitor_start_elevated, monitor_status, monitor_stop,
MonitorKernel,
};
use music::{
feiniu_activate_connection, feiniu_cache_clear, feiniu_cache_fetch, feiniu_cache_status,
feiniu_delete_connection, feiniu_fnconnect_resolve, feiniu_fnos_delete, feiniu_fnos_list,
feiniu_fnos_login, feiniu_fnos_logout, feiniu_fnos_status, feiniu_fnos_upload,
feiniu_get_config, feiniu_list_connections, feiniu_list_tracks, feiniu_login, feiniu_logout,
feiniu_lyric, feiniu_media_prefix, feiniu_save_connection, feiniu_scan_local,
feiniu_test_connection, music_cancel_runtime_install, music_download, music_download_cancel,
music_env_status, music_get_settings, music_get_sources, music_install_runtime,
music_parse_playlist, music_ping, music_resolve, music_save_settings, music_search,
music_stop_bridge, MusicManager,
};
use network_monitor::network_status;
use osd_window::{
osd_apply_overlay_style, osd_begin_drag, osd_set_bounds, osd_set_click_through,
@@ -61,7 +73,7 @@ use screenshot::commands::{
screenshot_register_shortcut,
screenshot_save_cache, screenshot_save_png, screenshot_scroll_capture,
screenshot_scroll_cancel, screenshot_scroll_finish, screenshot_scroll_start,
screenshot_show_overlay, screenshot_take_editor_image_raw,
screenshot_set_scroll_hole, screenshot_show_overlay, screenshot_take_editor_image_raw,
screenshot_unregister_pin_shortcut, screenshot_unregister_shortcut,
};
use clipboard::{
@@ -149,7 +161,10 @@ fn export_bindings() {
downloader_get_tasks, downloader_check_url, downloader_add_task, downloader_pause_task,
downloader_resume_task, downloader_cancel_task, downloader_redownload, downloader_remove_task, downloader_get_settings,
downloader_save_settings, downloader_open_dir, downloader_open_url, downloader_focus_window, downloader_inspect, downloader_select_bt_files,
// screenshot22,豁免 3get_fullscreen_bmp / take_editor_image_raw 返回 ipc::Response、
// music6,豁免 3music_ping / music_get_sources / music_search 返回 serde_json::Value
music_env_status, music_install_runtime, music_cancel_runtime_install,
music_stop_bridge, music_get_settings, music_save_settings,
// screenshot23,豁免 3get_fullscreen_bmp / take_editor_image_raw 返回 ipc::Response、
// compose_copy / compose_png 接收 ipc::Request
screenshot_disable_transitions, screenshot_show_overlay, screenshot_register_shortcut,
screenshot_unregister_shortcut, screenshot_register_pin_shortcut,
@@ -158,6 +173,7 @@ fn export_bindings() {
screenshot_crop_copy_stored, screenshot_pick_list, screenshot_cursor_pos,
screenshot_enum_windows, screenshot_capture_window, screenshot_scroll_capture,
screenshot_scroll_cancel, screenshot_scroll_finish, screenshot_scroll_start,
screenshot_set_scroll_hole,
screenshot_copy_image, screenshot_save_png,
screenshot_save_cache, screenshot_load_cache, screenshot_delete_cache,
])
@@ -243,6 +259,41 @@ pub fn run() {
monitor_set_auto_start,
monitor_get_hardware_config,
monitor_set_hardware_config,
music_env_status,
music_install_runtime,
music_cancel_runtime_install,
music_ping,
music_stop_bridge,
music_get_sources,
music_search,
music_parse_playlist,
music_resolve,
music_get_settings,
music_save_settings,
music_download,
music_download_cancel,
feiniu_list_connections,
feiniu_save_connection,
feiniu_delete_connection,
feiniu_activate_connection,
feiniu_test_connection,
feiniu_login,
feiniu_logout,
feiniu_get_config,
feiniu_list_tracks,
feiniu_lyric,
feiniu_media_prefix,
feiniu_scan_local,
feiniu_cache_status,
feiniu_cache_clear,
feiniu_cache_fetch,
feiniu_fnos_login,
feiniu_fnos_logout,
feiniu_fnos_status,
feiniu_fnos_upload,
feiniu_fnos_delete,
feiniu_fnos_list,
feiniu_fnconnect_resolve,
network_status,
osd_apply_overlay_style,
osd_begin_drag,
@@ -344,6 +395,7 @@ pub fn run() {
screenshot_scroll_cancel,
screenshot_scroll_finish,
screenshot_scroll_start,
screenshot_set_scroll_hole,
screenshot_take_editor_image_raw,
screenshot_copy_image,
screenshot_save_png,
@@ -395,6 +447,10 @@ pub fn run() {
});
let _ = rx.recv_timeout(std::time::Duration::from_secs(3));
}
if let Some(music) = app.try_state::<MusicManager>() {
// 停止音乐桥接进程(kill 快速返回,wait 在后台线程完成)
music.cleanup_on_exit();
}
if let Some(clip) = app.try_state::<ClipboardManager>() {
clip.stop();
}