SyncIOBridge caused tokio panic

This commit is contained in:
euzu
2025-11-21 01:35:04 +01:00
parent 24880101df
commit 98dc80dd75
16 changed files with 173 additions and 192 deletions
@@ -99,20 +99,6 @@ fn group_playlist_groups_by_cluster(playlist: Vec<PlaylistGroup>) -> (Vec<Playli
(live, video, series)
}
// async fn get_categories_content(action: Result<(Option<PathBuf>, Option<String>), std::io::Error>) -> Option<String> {
// if let Ok((Some(file_path), _content)) = action {
// if let Ok(content) = tokio::fs::read_to_string(&file_path).await {
// // TODO deserialize like sax parser
// if let Ok(categories) = serde_json::from_str::<Vec<PlaylistXtreamCategory>>(&content) {
// return serde_json::to_string(&categories).ok();
// }
// }
// }
// None
// }
async fn grouped_channels(
cfg: &AppConfig,
target: &ConfigTarget,
+2 -1
View File
@@ -10,7 +10,7 @@ use crate::repository::playlist_repository::load_target_into_memory_cache;
use crate::tools::lru_cache::LRUResourceCache;
use crate::utils::request::create_client;
use arc_swap::{ArcSwap, ArcSwapOption};
use log::error;
use log::{error, info};
use reqwest::Client;
use shared::error::TuliproxError;
use shared::model::UserConnectionPermission;
@@ -207,6 +207,7 @@ pub fn create_cache(config: &Config) -> Option<Arc<Mutex<LRUResourceCache>>> {
});
let cache_enabled = lru_cache.is_some();
if cache_enabled {
info!("Scanning cache");
if let Some(res_cache) = lru_cache {
let cache = Arc::new(Mutex::new(res_cache));
let cache_scanner = Arc::clone(&cache);