Compare commits
No commits in common. "ca2335d03f5f656dcb9c2f0ad783b7813fc89cfe" and "dd8a1a085b6f5474667c093d6b2917da383fc2f9" have entirely different histories.
ca2335d03f
...
dd8a1a085b
5 changed files with 12 additions and 7 deletions
|
@ -40,8 +40,6 @@ struct QPlayer<'a> {
|
||||||
content_check_ok: bool,
|
content_check_ok: bool,
|
||||||
/// Probably refers to allowing sensitive content, too
|
/// Probably refers to allowing sensitive content, too
|
||||||
racy_check_ok: bool,
|
racy_check_ok: bool,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
params: Option<&'a str>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
|
@ -115,7 +113,6 @@ impl RustyPipeQuery {
|
||||||
video_id,
|
video_id,
|
||||||
content_check_ok: true,
|
content_check_ok: true,
|
||||||
racy_check_ok: true,
|
racy_check_ok: true,
|
||||||
params: None,
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
QPlayer {
|
QPlayer {
|
||||||
|
@ -125,8 +122,6 @@ impl RustyPipeQuery {
|
||||||
video_id,
|
video_id,
|
||||||
content_check_ok: true,
|
content_check_ok: true,
|
||||||
racy_check_ok: true,
|
racy_check_ok: true,
|
||||||
// Source: https://github.com/TeamNewPipe/NewPipeExtractor/pull/1084
|
|
||||||
params: Some("CgIQBg").filter(|_| client_type == ClientType::Android),
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ use reqwest::StatusCode;
|
||||||
|
|
||||||
/// Error type for the RustyPipe library
|
/// Error type for the RustyPipe library
|
||||||
#[derive(thiserror::Error, Debug)]
|
#[derive(thiserror::Error, Debug)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// Error extracting content from YouTube
|
/// Error extracting content from YouTube
|
||||||
#[error("extraction error: {0}")]
|
#[error("extraction error: {0}")]
|
||||||
|
@ -23,6 +24,7 @@ pub enum Error {
|
||||||
|
|
||||||
/// Error extracting content from YouTube
|
/// Error extracting content from YouTube
|
||||||
#[derive(thiserror::Error, Debug)]
|
#[derive(thiserror::Error, Debug)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub enum ExtractionError {
|
pub enum ExtractionError {
|
||||||
/// Video cannot be extracted with RustyPipe
|
/// Video cannot be extracted with RustyPipe
|
||||||
///
|
///
|
||||||
|
|
|
@ -201,6 +201,13 @@ impl<'de> Deserialize<'de> for TextComponent {
|
||||||
D: Deserializer<'de>,
|
D: Deserializer<'de>,
|
||||||
{
|
{
|
||||||
let mut text = RichTextInternal::deserialize(deserializer)?;
|
let mut text = RichTextInternal::deserialize(deserializer)?;
|
||||||
|
if text.runs.len() != 1 {
|
||||||
|
return Err(serde::de::Error::invalid_length(
|
||||||
|
text.runs.len(),
|
||||||
|
&"1 run, use TextComponents for more",
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
Ok(text.runs.swap_remove(0).into())
|
Ok(text.runs.swap_remove(0).into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ MusicArtist(
|
||||||
id: "UCfwCE5VhPMGxNPFxtVv7lRw",
|
id: "UCfwCE5VhPMGxNPFxtVv7lRw",
|
||||||
name: "Sulli",
|
name: "Sulli",
|
||||||
header_image: "[header_image]",
|
header_image: "[header_image]",
|
||||||
description: Some("Choi Jin-ri, better known by her stage name Sulli, was a South Korean singer and actress. She first made her debut as a child actress, appearing as a supporting cast member on the SBS historical drama Ballad of Seodong. Following this, she earned a number of guest roles, appearing in the television series Love Needs a Miracle and Drama City, and the film Vacation. She then subsequently appeared in the independent films Punch Lady and BA:BO, the former being her first time cast in a substantial dramatic role.\nAfter signing a record deal with SM Entertainment, Sulli rose to prominence as a member of the girl group f(x) formed in 2009. The group achieved both critical and commercial success, with four Korean number-one singles and international recognition after becoming the first K-pop act to perform at SXSW. Concurrently with her music career, Sulli returned to acting by starring in the SBS romantic comedy series, To the Beautiful You, a Korean adaptation of the shōjo manga Hana-Kimi where her performance was positively received and earned her two SBS Drama Awards and a nomination at the 49th Paeksang Arts Awards.\n\nFrom Wikipedia (https://en.wikipedia.org/wiki/Sulli) under Creative Commons Attribution CC-BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/legalcode)"),
|
description: Some("Choi Jin-ri, better known by her stage name Sulli, was a South Korean actress and singer. She first made her debut as a child actress, appearing as a supporting cast member on the SBS historical drama Ballad of Seodong. Following this, she earned a number of guest roles, appearing in the television series Love Needs a Miracle and Drama City, and the film Vacation. She then subsequently appeared in the independent films Punch Lady and BA:BO, the former being her first time cast in a substantial dramatic role.\nAfter signing a record deal with SM Entertainment, Sulli rose to prominence as a member of the girl group f(x) formed in 2009. The group achieved both critical and commercial success, with four Korean number-one singles and international recognition after becoming the first K-pop act to perform at SXSW. Concurrently with her music career, Sulli returned to acting by starring in the SBS romantic comedy series, To the Beautiful You, a Korean adaptation of the shōjo manga Hana-Kimi where her performance was positively received and earned her two SBS Drama Awards and a nomination at the 49th Paeksang Arts Awards.\n\nFrom Wikipedia (https://en.wikipedia.org/wiki/Sulli) under Creative Commons Attribution CC-BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/legalcode)"),
|
||||||
wikipedia_url: Some("https://en.wikipedia.org/wiki/Sulli"),
|
wikipedia_url: Some("https://en.wikipedia.org/wiki/Sulli"),
|
||||||
subscriber_count: "[subscriber_count]",
|
subscriber_count: "[subscriber_count]",
|
||||||
tracks: "[tracks]",
|
tracks: "[tracks]",
|
||||||
|
|
|
@ -28,7 +28,8 @@ use rustypipe::param::{
|
||||||
#[rstest]
|
#[rstest]
|
||||||
#[case::desktop(ClientType::Desktop)]
|
#[case::desktop(ClientType::Desktop)]
|
||||||
#[case::tv_html5_embed(ClientType::TvHtml5Embed)]
|
#[case::tv_html5_embed(ClientType::TvHtml5Embed)]
|
||||||
#[case::android(ClientType::Android)]
|
// The Android client became flaky
|
||||||
|
// #[case::android(ClientType::Android)]
|
||||||
#[case::ios(ClientType::Ios)]
|
#[case::ios(ClientType::Ios)]
|
||||||
#[test_log::test]
|
#[test_log::test]
|
||||||
fn get_player_from_client(#[case] client_type: ClientType, rp: RustyPipe) {
|
fn get_player_from_client(#[case] client_type: ClientType, rp: RustyPipe) {
|
||||||
|
|
Loading…
Reference in a new issue