Feature/staged input and path improvements (#632)

* No template file not found error message
* Setup wizard improvmenets
* path improvements
* staged input fix
* path improvements
* Provider dns resolved ips now writing to a file instead of source.yml
* Playlist update hard kill after 1h
* matadata update tmdb fix
* Web UI fixes
* GeoIp update schedule
* batch:// prefix  for aliases
This commit is contained in:
euzu
2026-03-06 17:29:42 +01:00
committed by GitHub
parent c5632d0c98
commit 737d04d08b
82 changed files with 2506 additions and 1433 deletions
+25 -13
View File
@@ -5,6 +5,7 @@ use crate::model::FetchedPlaylist;
use crate::model::InputSource;
use crate::model::{AppConfig, ConfigTarget};
use crate::model::{ConfigInput, ConfigInputFlags};
use crate::processing::input_cache::resolve_input_storage_path;
use crate::processing::processor::playlist::PlaylistProcessingContext;
use crate::processing::processor::{
create_resolve_options_function_for_xtream_target, process_foreground_retry_once, select_cancel_token,
@@ -12,7 +13,6 @@ use crate::processing::processor::{
FOREGROUND_RETRY_BATCH_MAX_SIZE as RETRY_BATCH_MAX_SIZE,
};
use crate::ptt::ptt_parse_title;
use crate::repository::get_input_storage_path;
use crate::repository::persist_input_vod_info;
use crate::repository::persist_input_vod_info_batch;
use crate::repository::{xtream_get_file_path, BPlusTreeQuery};
@@ -148,15 +148,9 @@ async fn process_immediate_vod_info(
resolve_tmdb_enabled: bool,
) {
let input = fpl.input;
let working_dir = &ctx.config.config.load().working_dir;
let storage_dir = &ctx.config.config.load().storage_dir;
let storage_path = match get_input_storage_path(&input.name, working_dir).await {
Ok(path) => path,
Err(err) => {
error!("Can't resolve vod, input storage directory for input '{}' failed: {err}", input.name);
return;
}
};
let storage_path = resolve_input_storage_path(storage_dir, &input.name).await;
// Keep an optional read query open and reopen lazily only when needed.
let xtream_path = xtream_get_file_path(&storage_path, XtreamCluster::Video);
@@ -447,6 +441,26 @@ fn queue_background_vod_info(
let reasons = check_resolve_reasons(resolve_options, do_probe, resolve_tmdb_enabled, pli);
if !reasons.is_empty() {
if log_enabled!(Level::Debug) {
let has_details = pli.has_details();
let (has_tmdb, has_date, has_video, has_audio) =
match pli.header.additional_properties.as_ref() {
Some(StreamProperties::Video(props)) => {
let details = props.details.as_ref();
(
props.tmdb.is_some(),
details.and_then(|d| d.release_date.as_ref()).is_some(),
MediaQuality::is_valid_media_info(details.and_then(|d| d.video.as_deref())),
MediaQuality::is_valid_media_info(details.and_then(|d| d.audio.as_deref())),
)
}
_ => (false, false, false, false),
};
debug!(
"[Task] Creating ResolveVod task for input {}: id={}, reasons={}, has_details={}, has_tmdb={}, has_date={}, has_video_info={}, has_audio_info={}, title=\"{}\"",
input.name, provider_id, reasons, has_details, has_tmdb, has_date, has_video, has_audio, pli.header.title
);
}
let task =
UpdateTask::ResolveVod { id: provider_id, reason: reasons, delay: resolve_options.resolve_delay };
mgr.queue_task_background(input.name.clone(), task);
@@ -509,10 +523,8 @@ pub async fn update_vod_metadata(
db_query: Option<Arc<Mutex<BPlusTreeQuery<u32, XtreamPlaylistItem>>>>,
tmdb_resolved_out: Option<&AtomicBool>,
) -> Result<Option<VideoStreamProperties>, TuliproxError> {
let working_dir = &app_config.config.load().working_dir;
let storage_path = get_input_storage_path(&input.name, working_dir)
.await
.map_err(|e| shared::error::info_err!("Storage path error: {e}"))?;
let storage_dir = &app_config.config.load().storage_dir;
let storage_path = resolve_input_storage_path(storage_dir, &input.name).await;
// Check if we should skip based on input options
if input.has_flag(ConfigInputFlags::XtreamSkipVod) {