mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-20 06:42:20 +02:00
Fix/hls connect m3u parsing probe resolve (#646)
* Fix HLS session handling and disable retry for adaptive segment requests * Resolve / probe vod task uses last modified date * Resolve expiration date in input form * fixed m3u parsing * fixed wasm opt for frontend build
This commit is contained in:
@@ -112,7 +112,7 @@ async fn playlist_resolve_series_info(
|
||||
let resolve_tmdb_enabled = fpl.input.has_flag(ConfigInputFlags::ResolveTmdb);
|
||||
|
||||
let groups_to_add = if resolve_options.has_flag(ResolveOptionsFlags::Background) && ctx.metadata_manager.is_some() {
|
||||
queue_background_series_info(ctx, fpl, filter, &resolve_options, skip_resolve, resolve_tmdb_enabled).await
|
||||
queue_background_series_info(ctx, fpl, filter, &resolve_options, skip_resolve, resolve_tmdb_enabled)
|
||||
} else {
|
||||
process_immediate_series_info(ctx, fpl, filter, &resolve_options, skip_resolve, resolve_tmdb_enabled).await
|
||||
};
|
||||
@@ -178,7 +178,7 @@ fn sync_resolved_series_properties(provider_fpl: &mut FetchedPlaylist<'_>, proce
|
||||
}
|
||||
}
|
||||
|
||||
async fn queue_background_series_info(
|
||||
fn queue_background_series_info(
|
||||
ctx: &PlaylistProcessingContext,
|
||||
fpl: &mut FetchedPlaylist<'_>,
|
||||
filter: impl Fn(&PlaylistItem) -> bool,
|
||||
@@ -213,23 +213,26 @@ async fn queue_background_series_info(
|
||||
id: provider_id.clone(),
|
||||
reason: reasons,
|
||||
delay: resolve_options.resolve_delay,
|
||||
source_last_modified: pli
|
||||
.header
|
||||
.additional_properties
|
||||
.as_ref()
|
||||
.and_then(StreamProperties::get_last_modified),
|
||||
};
|
||||
if !mgr.should_skip_enqueue(input_name_arc.clone(), &task).await {
|
||||
if log_enabled!(Level::Debug) {
|
||||
let has_details = pli.has_details();
|
||||
let (has_tmdb, has_date) = match pli.header.additional_properties.as_ref() {
|
||||
Some(StreamProperties::Series(props)) => {
|
||||
(props.tmdb.is_some(), props.release_date.is_some())
|
||||
}
|
||||
_ => (false, false),
|
||||
};
|
||||
debug!(
|
||||
"[Task] Creating ResolveSeries task for input {}: id={}, reasons={}, has_details={}, has_tmdb={}, has_date={}, title=\"{}\"",
|
||||
input_name_arc, provider_id, reasons, has_details, has_tmdb, has_date, pli.header.title
|
||||
);
|
||||
}
|
||||
mgr.queue_task_background(input_name_arc.clone(), task);
|
||||
if log_enabled!(Level::Debug) {
|
||||
let has_details = pli.has_details();
|
||||
let (has_tmdb, has_date) = match pli.header.additional_properties.as_ref() {
|
||||
Some(StreamProperties::Series(props)) => {
|
||||
(props.tmdb.is_some(), props.release_date.is_some())
|
||||
}
|
||||
_ => (false, false),
|
||||
};
|
||||
debug!(
|
||||
"[Task] Creating ResolveSeries task for input {}: id={}, reasons={}, has_details={}, has_tmdb={}, has_date={}, title=\"{}\"",
|
||||
input_name_arc, provider_id, reasons, has_details, has_tmdb, has_date, pli.header.title
|
||||
);
|
||||
}
|
||||
mgr.queue_task_background(input_name_arc.clone(), task);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ async fn playlist_resolve_vod_info(
|
||||
let resolve_tmdb_enabled = fpl.input.has_flag(ConfigInputFlags::ResolveTmdb);
|
||||
|
||||
if resolve_options.has_flag(ResolveOptionsFlags::Background) && ctx.metadata_manager.is_some() {
|
||||
queue_background_vod_info(ctx, fpl, filter, &resolve_options, do_probe, resolve_tmdb_enabled).await;
|
||||
queue_background_vod_info(ctx, fpl, filter, &resolve_options, do_probe, resolve_tmdb_enabled);
|
||||
} else {
|
||||
process_immediate_vod_info(ctx, fpl, filter, resolve_options, do_probe, resolve_tmdb_enabled).await;
|
||||
}
|
||||
@@ -416,7 +416,7 @@ fn check_resolve_tmdb(
|
||||
}
|
||||
}
|
||||
|
||||
async fn queue_background_vod_info(
|
||||
fn queue_background_vod_info(
|
||||
ctx: &PlaylistProcessingContext,
|
||||
fpl: &mut FetchedPlaylist<'_>,
|
||||
filter: impl Fn(&PlaylistItem) -> bool,
|
||||
@@ -443,12 +443,16 @@ async fn queue_background_vod_info(
|
||||
let reasons = check_resolve_reasons(resolve_options, do_probe, resolve_tmdb_enabled, pli);
|
||||
|
||||
if !reasons.is_empty() {
|
||||
let task =
|
||||
UpdateTask::ResolveVod { id: provider_id.clone(), reason: reasons, delay: resolve_options.resolve_delay };
|
||||
if mgr.should_skip_enqueue(input.name.clone(), &task).await {
|
||||
continue;
|
||||
}
|
||||
|
||||
let task = UpdateTask::ResolveVod {
|
||||
id: provider_id.clone(),
|
||||
reason: reasons,
|
||||
delay: resolve_options.resolve_delay,
|
||||
source_last_modified: pli
|
||||
.header
|
||||
.additional_properties
|
||||
.as_ref()
|
||||
.and_then(StreamProperties::get_last_modified),
|
||||
};
|
||||
if log_enabled!(Level::Debug) {
|
||||
let has_details = pli.has_details();
|
||||
let (has_tmdb, has_date, has_video, has_audio) =
|
||||
|
||||
Reference in New Issue
Block a user