mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-26 16:52:25 +01:00
stream properties refactored
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
use std::sync::Arc;
|
||||
use crate::model::FetchedPlaylist;
|
||||
use crate::model::{AppConfig, ConfigTarget};
|
||||
use crate::processing::processor::xtream::{playlist_resolve_download_playlist_item};
|
||||
use crate::processing::processor::{create_resolve_options_function_for_xtream_target};
|
||||
use crate::repository::xtream_repository::{persists_input_vod_info};
|
||||
use crate::processing::processor::xtream::playlist_resolve_download_playlist_item;
|
||||
use crate::processing::processor::create_resolve_options_function_for_xtream_target;
|
||||
use crate::repository::storage::get_input_storage_path;
|
||||
use crate::repository::xtream_repository::persists_input_vod_info;
|
||||
use log::{error, info, log_enabled, Level};
|
||||
use shared::error::TuliproxError;
|
||||
use shared::model::{InputType, PlaylistEntry, StreamProperties, VideoStreamProperties, XtreamVideoInfo};
|
||||
use shared::model::{PlaylistItemType, XtreamCluster};
|
||||
use std::sync::Arc;
|
||||
use std::time::Instant;
|
||||
use crate::repository::storage::get_input_storage_path;
|
||||
|
||||
create_resolve_options_function_for_xtream_target!(vod);
|
||||
|
||||
@@ -52,7 +52,9 @@ pub async fn playlist_resolve_vod(app_config: &Arc<AppConfig>, client: &reqwest:
|
||||
if let Some(content) = playlist_resolve_download_playlist_item(client, pli, fpl.input, errors, resolve_delay, XtreamCluster::Video).await {
|
||||
if let Ok(info) = serde_json::from_str::<XtreamVideoInfo>(&content) {
|
||||
let video_stream_props = VideoStreamProperties::from_info(&info, pli);
|
||||
let _ = persists_input_vod_info(app_config, &storage_path, pli.header.xtream_cluster, &input.name, provider_id, &video_stream_props).await;
|
||||
if let Err(err) = persists_input_vod_info(app_config, &storage_path, pli.header.xtream_cluster, &input.name, provider_id, &video_stream_props).await {
|
||||
error!("Failed to persist VOD info for provider_id {provider_id}: {err}");
|
||||
}
|
||||
// This makes the data available for subsequent processing steps like STRM export.
|
||||
pli.header.additional_properties = Some(StreamProperties::Video(Box::new(video_stream_props)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user