diff --git a/CHANGELOG.md b/CHANGELOG.md index 5936209a2..1703f3d35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ # Changelog -# 3.1.6 (2025-xx-xx) -- EPG Config View +# 3.1.6 (2025-08-18) +- EPG Config View added - Fixed loading users for WebUI from user DB - Fixed auto EPG for batch inputs -- ContentSecurityPolicy can be enabled +- Fixed EPG URL prepare +- ContentSecurityPolicy can be enabled, default off # 3.1.5 (2025-08-14) - Hot reload for config diff --git a/backend/src/api/config_watch.rs b/backend/src/api/config_watch.rs index 2b62f4eca..4fa667704 100644 --- a/backend/src/api/config_watch.rs +++ b/backend/src/api/config_watch.rs @@ -82,7 +82,7 @@ impl ConfigFile { let sources_file = paths.sources_file_path.as_str(); let config = > as Access>::load(&app_state.app_config.config); let mut sources_dto = read_sources_file(sources_file, true, true, config.get_hdhr_device_overview().as_ref())?; - prepare_sources_batch(&mut sources_dto)?; + prepare_sources_batch(&mut sources_dto, true)?; let sources: SourcesConfig = SourcesConfig::try_from(sources_dto)?; info!("Loaded sources file {sources_file}"); update_app_state_sources(app_state, sources).await diff --git a/backend/src/api/endpoints/v1_api.rs b/backend/src/api/endpoints/v1_api.rs index 0d5b597d1..411259048 100644 --- a/backend/src/api/endpoints/v1_api.rs +++ b/backend/src/api/endpoints/v1_api.rs @@ -250,7 +250,7 @@ async fn config( let paths = app_state.app_config.paths.load(); match utils::read_app_config_dto(&paths, true, false) { Ok(mut app_config) => { - if let Err(err) = prepare_sources_batch(&mut app_config.sources) { + if let Err(err) = prepare_sources_batch(&mut app_config.sources, false) { error!("Failed to prepare sources batch: {err}"); axum::http::StatusCode::INTERNAL_SERVER_ERROR.into_response() } else if let Err(err) = prepare_users(&mut app_config, &app_state.app_config) { diff --git a/backend/src/utils/file/config_reader.rs b/backend/src/utils/file/config_reader.rs index 87eba59cf..4a73c066f 100644 --- a/backend/src/utils/file/config_reader.rs +++ b/backend/src/utils/file/config_reader.rs @@ -125,7 +125,7 @@ pub fn read_app_config_dto(paths: &ConfigPaths, }) } -pub fn prepare_sources_batch(sources: &mut SourcesConfigDto) -> Result<(), TuliproxError> { +pub fn prepare_sources_batch(sources: &mut SourcesConfigDto, include_computed: bool) -> Result<(), TuliproxError> { let mut current_index = 0; @@ -161,7 +161,7 @@ pub fn prepare_sources_batch(sources: &mut SourcesConfigDto) -> Result<(), Tulip } } // we need to prepare epg after alias, because epg `auto` depends on the first input url. - input.prepare_epg(true)?; + input.prepare_epg(include_computed)?; } } Ok(()) @@ -213,7 +213,7 @@ pub fn read_initial_app_config(paths: &mut ConfigPaths, let config_dto = read_config_file(config_file, resolve_env)?; let mut sources_dto = read_sources_file(sources_file, resolve_env, include_computed, config_dto.get_hdhr_device_overview().as_ref())?; - prepare_sources_batch(&mut sources_dto)?; + prepare_sources_batch(&mut sources_dto, include_computed)?; let sources: SourcesConfig = SourcesConfig::try_from(sources_dto)?; let mut config: Config = Config::from(config_dto); config.prepare(config_path)?;