scene: stagedirection: switch to a generic playlist name based interface to mixxx, instead of PWM episode numbers

This commit is contained in:
2026-06-16 11:29:48 +02:00
parent 359941c094
commit 0a2a09eb3c
4 changed files with 14 additions and 16 deletions
+6 -2
View File
@@ -145,13 +145,17 @@ impl Ui {
match command {
// FIXME: Need some new kind of /bandcamp command to force loading of specific urls
"/episode" => {
if let Ok(episode_number) = arg.trim().parse() {
self.predictions.insert(PredictionAction::SetEpisodeNumber(episode_number)).await;
if let Ok(episode_number) = arg.trim().parse::<u32>() {
let playlist_name = format!("BFF.fm - Episode {}", episode_number);
self.predictions.insert(PredictionAction::SetPlaylist(playlist_name)).await;
} else {
log::error!("Invalid episode number format. Use /episode [number]");
return;
}
},
"/playlist" => {
self.predictions.insert(PredictionAction::SetPlaylist(arg.trim().to_string())).await;
}
"/timer" => {
if let Ok(minutes) = arg.trim().parse::<i64>() {
let end_time = Utc::now() + Duration::minutes(minutes);