scene: stagedirection: switch to a generic playlist name based interface to mixxx, instead of PWM episode numbers
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user