mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-20 06:42:20 +02:00
@@ -40,6 +40,7 @@ pub async fn update_generic_stream_metadata(
|
||||
item_type: PlaylistItemType,
|
||||
active_provider: &Arc<ActiveProviderManager>,
|
||||
active_handle: Option<&crate::api::model::ProviderHandle>,
|
||||
probe_priority: i8,
|
||||
) -> Result<GenericProbeOutcome, TuliproxError> {
|
||||
let storage_dir = &app_config.config.load().storage_dir;
|
||||
|
||||
@@ -89,7 +90,7 @@ pub async fn update_generic_stream_metadata(
|
||||
let acquired_handle = if !needs_provider_connection || active_handle.is_some() {
|
||||
None
|
||||
} else {
|
||||
active_provider.acquire_connection_for_probe(&input.name).await
|
||||
active_provider.acquire_connection_for_probe(&input.name, probe_priority).await
|
||||
};
|
||||
|
||||
if needs_provider_connection && active_handle.is_none() && acquired_handle.is_none() {
|
||||
|
||||
@@ -33,6 +33,7 @@ use std::collections::{HashMap, HashSet};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
use std::time::{Duration, Instant};
|
||||
use shared::utils::default_probe_user_priority;
|
||||
|
||||
create_resolve_options_function_for_xtream_target!(series);
|
||||
|
||||
@@ -848,6 +849,7 @@ pub async fn update_series_metadata(
|
||||
if let Some(details) = properties.details.as_mut() {
|
||||
if let Some(episodes) = details.episodes.as_mut() {
|
||||
let config = app_config.config.load();
|
||||
let probe_priority = config.metadata_update.as_ref().map_or(default_probe_user_priority(), |cfg| cfg.probe.user_priority);
|
||||
let user_agent = config.default_user_agent.clone();
|
||||
|
||||
let input_url = input.url.as_str();
|
||||
@@ -868,7 +870,7 @@ pub async fn update_series_metadata(
|
||||
let temp_handle = if active_handle.is_some() {
|
||||
None
|
||||
} else {
|
||||
active_provider.acquire_connection_for_probe(&input.name).await
|
||||
active_provider.acquire_connection_for_probe(&input.name, probe_priority).await
|
||||
};
|
||||
|
||||
if active_handle.is_some() || temp_handle.is_some() {
|
||||
|
||||
@@ -30,6 +30,7 @@ use std::collections::{HashMap, HashSet};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
use std::time::{Duration, Instant};
|
||||
use shared::utils::default_probe_user_priority;
|
||||
|
||||
create_resolve_options_function_for_xtream_target!(vod);
|
||||
|
||||
@@ -814,11 +815,13 @@ pub async fn update_vod_metadata(
|
||||
let analyze_duration = metadata_update.ffprobe.analyze_duration_micros;
|
||||
let probe_size = metadata_update.ffprobe.probe_size_bytes;
|
||||
|
||||
let probe_priority = config.metadata_update.as_ref().map_or(default_probe_user_priority(), |cfg| cfg.probe.user_priority);
|
||||
|
||||
// Acquire Connection logic
|
||||
let temp_handle = if active_handle.is_some() {
|
||||
None // No new handle needed
|
||||
} else {
|
||||
active_provider.acquire_connection_for_probe(&input.name).await
|
||||
active_provider.acquire_connection_for_probe(&input.name, probe_priority).await
|
||||
};
|
||||
|
||||
if active_handle.is_some() || temp_handle.is_some() {
|
||||
|
||||
Reference in New Issue
Block a user