Add command to show recommendations. (#593)
* Add command to show recommendations. This adds a command `similar selected|current` which enables searching for track recommendations for playlists, albums as well as single tracks. * Make sure to only send 5 seed items in total. * Add docs for recommendation bindings to the README
This commit is contained in:
@@ -258,6 +258,7 @@ impl CommandManager {
|
||||
| Command::Delete
|
||||
| Command::Back
|
||||
| Command::Open(_)
|
||||
| Command::ShowRecommendations(_)
|
||||
| Command::Insert(_)
|
||||
| Command::Goto(_) => Ok(None),
|
||||
_ => Err("Unknown Command".into()),
|
||||
@@ -390,6 +391,15 @@ impl CommandManager {
|
||||
kb.insert("a".into(), Command::Goto(GotoMode::Album));
|
||||
kb.insert("A".into(), Command::Goto(GotoMode::Artist));
|
||||
|
||||
kb.insert(
|
||||
"m".into(),
|
||||
Command::ShowRecommendations(TargetMode::Selected),
|
||||
);
|
||||
kb.insert(
|
||||
"M".into(),
|
||||
Command::ShowRecommendations(TargetMode::Current),
|
||||
);
|
||||
|
||||
kb.insert("Up".into(), Command::Move(MoveMode::Up, Default::default()));
|
||||
kb.insert(
|
||||
"p".into(),
|
||||
|
||||
Reference in New Issue
Block a user