(&self, item: FullTrack)
| 276 | |
| 277 | #[tracing::instrument(level = "debug", skip(self, item))] |
| 278 | fn parse_playlist_item(&self, item: FullTrack) -> Song { |
| 279 | let id = item.id.unwrap().to_string(); |
| 280 | Song { |
| 281 | song: QueryableSong { |
| 282 | _id: Some(format!("spotify:{}", id)), |
| 283 | title: Some(item.name), |
| 284 | duration: Some(item.duration.num_seconds() as f64), |
| 285 | type_: SongType::SPOTIFY, |
| 286 | url: Some(id.clone()), |
| 287 | song_cover_path_high: item.album.images.first().map(|i| i.url.clone()), |
| 288 | playback_url: Some(id), |
| 289 | track_no: Some(item.disc_number as f64), |
| 290 | provider_extension: Some(self.key()), |
| 291 | ..Default::default() |
| 292 | }, |
| 293 | album: if item.album.id.is_some() { |
| 294 | Some(Self::parse_album(item.album)) |
| 295 | } else { |
| 296 | None |
| 297 | }, |
| 298 | artists: Some( |
| 299 | item.artists |
| 300 | .into_iter() |
| 301 | .map(|a| Self::parse_artists(a, None)) |
| 302 | .collect(), |
| 303 | ), |
| 304 | ..Default::default() |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | #[tracing::instrument(level = "debug", skip(self))] |
| 309 | async fn fetch_user_details(&self) -> Result<(ProviderStatus, bool)> { |
no test coverage detected