fix: used borrowed str for QBrowse
This commit is contained in:
parent
e4046aef00
commit
dae8c1e775
6 changed files with 9 additions and 9 deletions
|
|
@ -136,7 +136,7 @@ struct ThirdParty<'a> {
|
|||
#[serde(rename_all = "camelCase")]
|
||||
struct QBrowse<'a> {
|
||||
context: YTContext<'a>,
|
||||
browse_id: String,
|
||||
browse_id: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ impl RustyPipeQuery {
|
|||
.await;
|
||||
let request_body = QBrowse {
|
||||
context,
|
||||
browse_id: artist_id.to_owned(),
|
||||
browse_id: artist_id,
|
||||
};
|
||||
|
||||
let (mut artist, album_page_params) = self
|
||||
|
|
@ -78,7 +78,7 @@ impl RustyPipeQuery {
|
|||
let context = self.get_context(ClientType::DesktopMusic, true, None).await;
|
||||
let request_body = QBrowse {
|
||||
context,
|
||||
browse_id: artist_id.to_owned(),
|
||||
browse_id: artist_id,
|
||||
};
|
||||
|
||||
self.execute_request::<response::MusicArtist, _, _>(
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ impl RustyPipeQuery {
|
|||
let context = self.get_context(ClientType::DesktopMusic, true, None).await;
|
||||
let request_body = QBrowse {
|
||||
context,
|
||||
browse_id: "VL".to_owned() + playlist_id,
|
||||
browse_id: &format!("VL{}", playlist_id),
|
||||
};
|
||||
|
||||
self.execute_request::<response::MusicPlaylist, _, _>(
|
||||
|
|
@ -37,7 +37,7 @@ impl RustyPipeQuery {
|
|||
let context = self.get_context(ClientType::DesktopMusic, true, None).await;
|
||||
let request_body = QBrowse {
|
||||
context,
|
||||
browse_id: album_id.to_owned(),
|
||||
browse_id: album_id,
|
||||
};
|
||||
|
||||
self.execute_request::<response::MusicPlaylist, _, _>(
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ impl RustyPipeQuery {
|
|||
let context = self.get_context(ClientType::Desktop, true, None).await;
|
||||
let request_body = QBrowse {
|
||||
context,
|
||||
browse_id: "VL".to_owned() + playlist_id,
|
||||
browse_id: &format!("VL{}", playlist_id),
|
||||
};
|
||||
|
||||
self.execute_request::<response::Playlist, _, _>(
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ impl RustyPipeQuery {
|
|||
let context = self.get_context(ClientType::Desktop, true, None).await;
|
||||
let request_body = QBrowse {
|
||||
context,
|
||||
browse_id: "FEwhat_to_watch".to_owned(),
|
||||
browse_id: "FEwhat_to_watch",
|
||||
};
|
||||
|
||||
self.execute_request::<response::Startpage, _, _>(
|
||||
|
|
@ -32,7 +32,7 @@ impl RustyPipeQuery {
|
|||
let context = self.get_context(ClientType::Desktop, true, None).await;
|
||||
let request_body = QBrowse {
|
||||
context,
|
||||
browse_id: "FEtrending".to_owned(),
|
||||
browse_id: "FEtrending",
|
||||
};
|
||||
|
||||
self.execute_request::<response::Trending, _, _>(
|
||||
|
|
|
|||
|
|
@ -1784,7 +1784,7 @@ async fn music_radio_playlist() {
|
|||
.music_radio_playlist("PL5dDx681T4bR7ZF1IuWzOv1omlRbE7PiJ")
|
||||
.await
|
||||
.unwrap();
|
||||
assert_next(tracks, &rp.query(), 20, 1).await;
|
||||
assert_next(tracks, &rp.query(), 10, 1).await;
|
||||
}
|
||||
|
||||
//#TESTUTIL
|
||||
|
|
|
|||
Reference in a new issue