Fix spelling mistake
This commit is contained in:
committed by
Henrik Friedrichsen
parent
6e2b108284
commit
3d11b2c333
@@ -683,7 +683,7 @@ impl Spotify {
|
||||
self.api_with_retry(|api| api.get_an_episode(episode_id.to_string(), self.country))
|
||||
}
|
||||
|
||||
pub fn recommentations(
|
||||
pub fn recommendations(
|
||||
&self,
|
||||
seed_artists: Option<Vec<String>>,
|
||||
seed_genres: Option<Vec<String>>,
|
||||
|
||||
@@ -241,7 +241,7 @@ impl ListItem for Track {
|
||||
None
|
||||
}
|
||||
|
||||
fn open_recommentations(
|
||||
fn open_recommendations(
|
||||
&self,
|
||||
queue: Arc<Queue>,
|
||||
library: Arc<Library>,
|
||||
@@ -250,7 +250,7 @@ impl ListItem for Track {
|
||||
|
||||
let recommendations: Option<Vec<Track>> = if let Some(id) = &self.id {
|
||||
spotify
|
||||
.recommentations(None, None, Some(vec![id.clone()]))
|
||||
.recommendations(None, None, Some(vec![id.clone()]))
|
||||
.map(|r| r.tracks)
|
||||
.map(|tracks| tracks.iter().map(Track::from).collect())
|
||||
} else {
|
||||
|
||||
@@ -26,7 +26,7 @@ pub trait ListItem: Sync + Send + 'static {
|
||||
fn save(&mut self, library: Arc<Library>);
|
||||
fn unsave(&mut self, library: Arc<Library>);
|
||||
fn open(&self, queue: Arc<Queue>, library: Arc<Library>) -> Option<Box<dyn ViewExt>>;
|
||||
fn open_recommentations(
|
||||
fn open_recommendations(
|
||||
&self,
|
||||
_queue: Arc<Queue>,
|
||||
_library: Arc<Library>,
|
||||
|
||||
@@ -38,7 +38,7 @@ enum ContextMenuAction {
|
||||
SelectArtist(Vec<Artist>),
|
||||
ShareUrl(String),
|
||||
AddToPlaylist(Box<Track>),
|
||||
ShowRecommentations(Box<dyn ListItem>),
|
||||
ShowRecommendations(Box<dyn ListItem>),
|
||||
ToggleTrackSavedStatus(Box<Track>),
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ impl ContextMenu {
|
||||
);
|
||||
content.add_item(
|
||||
"Similar tracks",
|
||||
ContextMenuAction::ShowRecommentations(Box::new(t.clone())),
|
||||
ContextMenuAction::ShowRecommendations(Box::new(t.clone())),
|
||||
);
|
||||
content.add_item(
|
||||
match library.is_saved_track(&Playable::Track(t.clone())) {
|
||||
@@ -195,8 +195,8 @@ impl ContextMenu {
|
||||
Self::add_track_dialog(library, queue.get_spotify(), *track.clone());
|
||||
s.add_layer(dialog);
|
||||
}
|
||||
ContextMenuAction::ShowRecommentations(item) => {
|
||||
if let Some(view) = item.open_recommentations(queue, library) {
|
||||
ContextMenuAction::ShowRecommendations(item) => {
|
||||
if let Some(view) = item.open_recommendations(queue, library) {
|
||||
s.call_on_name("main", move |v: &mut Layout| v.push_view(view));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user