always init list on start, no full path for master.m3u8

This commit is contained in:
jb-alvarado 2024-06-29 23:37:03 +02:00
parent 1777a9861f
commit 70fcf41923
3 changed files with 4 additions and 1 deletions

View File

@ -910,6 +910,7 @@ pub async fn process_control(
user: web::ReqData<UserMeta>,
) -> Result<impl Responder, ServiceError> {
let manager = controllers.lock().unwrap().get(*id).unwrap();
manager.list_init.store(true, Ordering::SeqCst);
match proc.into_inner().command {
ProcessCtl::Status => {

View File

@ -118,6 +118,7 @@ impl ChannelManager {
self.run_count.fetch_add(1, Ordering::SeqCst);
self.is_alive.store(true, Ordering::SeqCst);
self.is_terminated.store(false, Ordering::SeqCst);
self.list_init.store(true, Ordering::SeqCst);
let pool_clone = self.db_pool.clone().unwrap();
let self_clone = self.clone();
@ -143,6 +144,7 @@ impl ChannelManager {
self.run_count.fetch_add(1, Ordering::SeqCst);
self.is_alive.store(true, Ordering::SeqCst);
self.is_terminated.store(false, Ordering::SeqCst);
self.list_init.store(true, Ordering::SeqCst);
let pool_clone = self.db_pool.clone().unwrap();
let self_clone = self.clone();

View File

@ -681,7 +681,7 @@ impl PlayoutConfig {
}
for item in cmd.iter_mut() {
if item.ends_with(".ts") || item.ends_with(".m3u8") {
if item.ends_with(".ts") || (item.ends_with(".m3u8") && item != "master.m3u8") {
if let Ok((hls_path, _, _)) = norm_abs_path(&global.hls_path, item) {
item.clone_from(&hls_path.to_string_lossy().to_string());
};