diff --git a/backend/src/processing/processor/playlist.rs b/backend/src/processing/processor/playlist.rs index c2a0fcb50..b168343f8 100644 --- a/backend/src/processing/processor/playlist.rs +++ b/backend/src/processing/processor/playlist.rs @@ -206,11 +206,9 @@ fn map_channel(mut channel: PlaylistItem, mapping: &Mapping) -> (PlaylistItem, b fn map_channel_with_aliases(channel: PlaylistItem, mapping: &Mapping) -> Vec { if mapping.create_alias { let original = channel.clone(); - let base_uuid = *original.header.get_uuid(); let (mut mapped_channel, matched) = map_channel(channel, mapping); if matched { mapped_channel.header.uuid = create_alias_uuid(original.header.get_uuid(), &mapping.id); - mapped_channel.header.alias_of = Some(base_uuid); vec![original, mapped_channel] } else { vec![mapped_channel] diff --git a/backend/src/processing/processor/xtream.rs b/backend/src/processing/processor/xtream.rs index fb10203c1..f7591d133 100644 --- a/backend/src/processing/processor/xtream.rs +++ b/backend/src/processing/processor/xtream.rs @@ -82,9 +82,6 @@ pub(in crate::processing) fn create_resolve_info_wal_files(cfg: &Config, input: pub(in crate::processing) fn should_update_info(pli: &mut PlaylistItem, processed_provider_ids: &HashMap, field: &str) -> (bool, u32, u64) { let Some(provider_id) = pli.header.get_provider_id() else { return (false, 0, 0) }; let last_modified = pli.header.get_additional_property_as_u64(field); - if pli.header.alias_of.is_some() { - return (false, provider_id, last_modified.unwrap_or(0)); - } let old_timestamp = processed_provider_ids.get(&provider_id); (old_timestamp.is_none() || last_modified.is_none() diff --git a/backend/src/processing/processor/xtream_series.rs b/backend/src/processing/processor/xtream_series.rs index 2fe3cbcfe..9389cb6e8 100644 --- a/backend/src/processing/processor/xtream_series.rs +++ b/backend/src/processing/processor/xtream_series.rs @@ -11,7 +11,7 @@ use crate::repository::xtream_repository::{write_series_info_to_wal_file, xtream use crate::repository::IndexedDocumentReader; use shared::error::{notify_err, info_err}; use crate::processing::processor::{handle_error, handle_error_and_return, create_resolve_options_function_for_xtream_target}; -use std::collections::HashMap; +use std::collections::{HashMap, HashSet}; use std::fs::File; use std::io::{BufWriter, Write}; use std::sync::Arc; @@ -53,6 +53,7 @@ fn should_update_series_info(pli: &mut PlaylistItem, processed_provider_ids: &Ha async fn playlist_resolve_series_info(cfg: &AppConfig, client: Arc, errors: &mut Vec, fpl: &mut FetchedPlaylist<'_>, resolve_delay: u16) -> bool { let mut processed_info_ids = read_processed_series_info_ids(cfg, errors, fpl).await; + let mut fetched_in_run: HashSet = HashSet::new(); // we cant write to the indexed-document directly because of the write lock and time-consuming operation. // All readers would be waiting for the lock and the app would be unresponsive. // We collect the content into a wal file and write it once we collected everything. @@ -81,7 +82,7 @@ async fn playlist_resolve_series_info(cfg: &AppConfig, client: Arc = HashSet::new(); let mut content_writer = utils::file_writer(&wal_content_file); let mut record_writer = utils::file_writer(&wal_record_file); let mut content_updated = false; @@ -96,8 +97,8 @@ pub async fn playlist_resolve_vod(app_config: &AppConfig, client: Arc, pub id: String, // provider id pub virtual_id: u32, // virtual id pub name: String,