fix: use url-safe base64, rename channel_info2 operation

This commit is contained in:
ThetaDev 2023-11-24 16:21:53 +01:00
parent b0a0df50b4
commit 342780ef68
No known key found for this signature in database
GPG key ID: 649CA4EBDC338394
3 changed files with 4 additions and 4 deletions

View file

@ -340,7 +340,7 @@ async fn channel_playlists() {
} }
async fn channel_info() { async fn channel_info() {
let json_path = path!(*TESTFILES_DIR / "channel" / "channel_info2.json"); let json_path = path!(*TESTFILES_DIR / "channel" / "channel_info.json");
if json_path.exists() { if json_path.exists() {
return; return;
} }

View file

@ -189,7 +189,7 @@ impl RustyPipeQuery {
self.execute_request::<response::ChannelAbout, _, _>( self.execute_request::<response::ChannelAbout, _, _>(
ClientType::Desktop, ClientType::Desktop,
"channel_info2", "channel_info",
channel_id, channel_id,
"browse", "browse",
&request_body, &request_body,

View file

@ -467,11 +467,11 @@ pub fn video_id_from_thumbnail_url(url: &str) -> Option<String> {
} }
pub fn b64_encode<T: AsRef<[u8]>>(input: T) -> String { pub fn b64_encode<T: AsRef<[u8]>>(input: T) -> String {
base64::engine::general_purpose::STANDARD.encode(input) base64::engine::general_purpose::URL_SAFE.encode(input)
} }
pub fn b64_decode<T: AsRef<[u8]>>(input: T) -> Result<Vec<u8>, base64::DecodeError> { pub fn b64_decode<T: AsRef<[u8]>>(input: T) -> Result<Vec<u8>, base64::DecodeError> {
base64::engine::general_purpose::STANDARD.decode(input) base64::engine::general_purpose::URL_SAFE.decode(input)
} }
/// Get the country from its English name /// Get the country from its English name