wire mid-roll breaks into schedule engine with chapter-aware splitting
This commit is contained in:
@@ -128,13 +128,15 @@ impl KTvMcpServer {
|
||||
};
|
||||
channels::update_channel(
|
||||
&self.channel_cmd_deps,
|
||||
id,
|
||||
self.owner_id,
|
||||
p.name,
|
||||
p.timezone,
|
||||
p.description,
|
||||
schedule_config,
|
||||
gap_filler,
|
||||
channels::UpdateChannelArgs {
|
||||
channel_id: id,
|
||||
owner_id: self.owner_id,
|
||||
name: p.name,
|
||||
timezone: p.timezone,
|
||||
description: p.description,
|
||||
schedule_config,
|
||||
gap_filler,
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -45,26 +45,30 @@ pub async fn create_channel(
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UpdateChannelArgs {
|
||||
pub channel_id: Uuid,
|
||||
pub owner_id: Uuid,
|
||||
pub name: Option<String>,
|
||||
pub timezone: Option<String>,
|
||||
pub description: Option<String>,
|
||||
pub schedule_config: Option<domain::ScheduleConfig>,
|
||||
pub gap_filler: Option<Option<domain::MediaFilter>>,
|
||||
}
|
||||
|
||||
pub async fn update_channel(
|
||||
cmd_deps: &Arc<ChannelCommandDeps>,
|
||||
channel_id: Uuid,
|
||||
owner_id: Uuid,
|
||||
name: Option<String>,
|
||||
timezone: Option<String>,
|
||||
description: Option<String>,
|
||||
schedule_config: Option<domain::ScheduleConfig>,
|
||||
gap_filler: Option<Option<domain::MediaFilter>>,
|
||||
args: UpdateChannelArgs,
|
||||
) -> String {
|
||||
let cmd = UpdateChannelCommand {
|
||||
channel_id: channel_id.into(),
|
||||
owner_id: owner_id.into(),
|
||||
name,
|
||||
description: description.map(Some),
|
||||
timezone,
|
||||
schedule_config,
|
||||
channel_id: args.channel_id.into(),
|
||||
owner_id: args.owner_id.into(),
|
||||
name: args.name,
|
||||
description: args.description.map(Some),
|
||||
timezone: args.timezone,
|
||||
schedule_config: args.schedule_config,
|
||||
rotation_policy: None,
|
||||
auto_schedule: None,
|
||||
gap_filler,
|
||||
gap_filler: args.gap_filler,
|
||||
};
|
||||
match application::channels::update::execute(cmd_deps, cmd).await {
|
||||
Ok(channel) => ok_json(&channel),
|
||||
|
||||
Reference in New Issue
Block a user