mirror of
https://github.com/euzu/tuliprox.git
synced 2026-09-30 21:12:12 +02:00
Fixed EPG URL prepare
This commit is contained in:
+4
-3
@@ -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
|
||||
|
||||
@@ -82,7 +82,7 @@ impl ConfigFile {
|
||||
let sources_file = paths.sources_file_path.as_str();
|
||||
let config = <Arc<ArcSwap<Config>> as Access<Config>>::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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user