diff --git a/src/api/client.rs b/src/api/client.rs index 7413659b..72ff083b 100644 --- a/src/api/client.rs +++ b/src/api/client.rs @@ -388,12 +388,9 @@ impl SpotifyClient { pub(crate) fn get_playlist(&self, id: &str) -> SpotifyRequest<'_, (), Playlist> { let query = make_query_params() .append_pair("market", "from_token") - // why still grab the tracks field? + // why still grab the tracks field? // the model still expects the appearance of a tracks field - .append_pair( - "fields", - "id,name,images,owner,tracks(total)", - ) + .append_pair("fields", "id,name,images,owner,tracks(total)") .finish(); self.request() .method(Method::GET) diff --git a/src/app/components/playlist_details/playlist_details_model.rs b/src/app/components/playlist_details/playlist_details_model.rs index a14ddb67..5f0d762c 100644 --- a/src/app/components/playlist_details/playlist_details_model.rs +++ b/src/app/components/playlist_details/playlist_details_model.rs @@ -68,8 +68,7 @@ impl PlaylistDetailsModel { if playlist.songs.songs.is_empty() { error!("Unable to start playback because songs is empty"); self.dispatcher - .dispatch( - AppAction::ShowNotification(gettext( + .dispatch(AppAction::ShowNotification(gettext( "An error occured. Check logs for details!", ))); return; @@ -97,9 +96,11 @@ impl PlaylistDetailsModel { let playlist = api.get_playlist(&id).await; let playlist_tracks = api.get_playlist_tracks(&id, 0, 100).await?; match playlist { - Ok(playlist) => { - Ok(BrowserAction::SetPlaylistDetails(Box::new(playlist), Box::new(playlist_tracks)).into()) - } + Ok(playlist) => Ok(BrowserAction::SetPlaylistDetails( + Box::new(playlist), + Box::new(playlist_tracks), + ) + .into()), Err(SpotifyApiError::BadStatus(400, _)) | Err(SpotifyApiError::BadStatus(404, _)) => { Ok(BrowserAction::NavigationPop.into())