diff options
Diffstat (limited to 'pkgs/by-name/mp/mpdpopm')
| -rw-r--r-- | pkgs/by-name/mp/mpdpopm/src/dj/algorithms.rs | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/pkgs/by-name/mp/mpdpopm/src/dj/algorithms.rs b/pkgs/by-name/mp/mpdpopm/src/dj/algorithms.rs index fcb05817..37c91470 100644 --- a/pkgs/by-name/mp/mpdpopm/src/dj/algorithms.rs +++ b/pkgs/by-name/mp/mpdpopm/src/dj/algorithms.rs @@ -21,11 +21,6 @@ impl Algorithm for Discovery { async fn next_track(&mut self, client: &mut Client) -> Result<String> { macro_rules! take { ($first:expr, $second:expr, $third:expr) => {{ - tracing::info!( - "Selecting a `{}` track for the next entry in the queue", - stringify!($first) - ); - $first.pop().map_or_else( || { $second.pop().map_or_else( @@ -36,13 +31,31 @@ impl Algorithm for Discovery { "This means that there are no songs in the libary" ) }, - Ok::<_, anyhow::Error>, + |val| { + tracing::info!( + "Selecting a `{}` track for the next entry in the queue", + stringify!($third) + ); + Ok::<_, anyhow::Error>(val) + }, ) }, - Ok::<_, anyhow::Error>, + |val| { + tracing::info!( + "Selecting a `{}` track for the next entry in the queue", + stringify!($second) + ); + Ok::<_, anyhow::Error>(val) + }, ) }, - Ok::<_, anyhow::Error>, + |val| { + tracing::info!( + "Selecting a `{}` track for the next entry in the queue", + stringify!($first) + ); + Ok::<_, anyhow::Error>(val) + }, ) }}; } |
