diff --git a/src/spotify.rs b/src/spotify.rs index 7f0a836..d6c20bb 100644 --- a/src/spotify.rs +++ b/src/spotify.rs @@ -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>, seed_genres: Option>, diff --git a/src/track.rs b/src/track.rs index 1b48658..f347f82 100644 --- a/src/track.rs +++ b/src/track.rs @@ -241,7 +241,7 @@ impl ListItem for Track { None } - fn open_recommentations( + fn open_recommendations( &self, queue: Arc, library: Arc, @@ -250,7 +250,7 @@ impl ListItem for Track { let recommendations: Option> = 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 { diff --git a/src/traits.rs b/src/traits.rs index dae0476..b598dbc 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -26,7 +26,7 @@ pub trait ListItem: Sync + Send + 'static { fn save(&mut self, library: Arc); fn unsave(&mut self, library: Arc); fn open(&self, queue: Arc, library: Arc) -> Option>; - fn open_recommentations( + fn open_recommendations( &self, _queue: Arc, _library: Arc, diff --git a/src/ui/contextmenu.rs b/src/ui/contextmenu.rs index a580ace..8a20c08 100644 --- a/src/ui/contextmenu.rs +++ b/src/ui/contextmenu.rs @@ -38,7 +38,7 @@ enum ContextMenuAction { SelectArtist(Vec), ShareUrl(String), AddToPlaylist(Box), - ShowRecommentations(Box), + ShowRecommendations(Box), ToggleTrackSavedStatus(Box), } @@ -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)); } }