Compare commits

..

5 commits

Author SHA1 Message Date
8166af9e70
chore(release): release rustypipe v0.1.1
Some checks failed
Release / Release (push) Failing after 21s
CI / Test (push) Has been cancelled
2024-03-26 20:12:04 +01:00
78ba9cb34c
chore: fix release script (unquoted include paths) 2024-03-26 20:11:14 +01:00
47e077e03b
chore(release): bump rustypipe to v0.1.1 2024-03-26 20:03:11 +01:00
be314d57ea
chore: update user agent (FF 115.0) 2024-03-26 20:03:09 +01:00
a81c3e8336
fix: parsing music details with video description tab 2024-03-24 02:34:53 +01:00
9 changed files with 49 additions and 11 deletions

View file

@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [v0.1.1](https://code.thetadev.de/ThetaDev/rustypipe/compare/rustypipe-cli/v0.1.0..v0.1.1) - 2024-03-26
### 🐛 Bug Fixes
- Parsing music details with video description tab - ([a81c3e8](https://code.thetadev.de/ThetaDev/rustypipe/commit/a81c3e83366fdf72d01dd3ee00fb2e831f7aaa26))
### ⚙️ Miscellaneous Tasks
- Update user agent (FF 115.0) - ([be314d5](https://code.thetadev.de/ThetaDev/rustypipe/commit/be314d57ea1d99bfdc80649351ee3e7845541238))
## v0.1.0 - 2024-03-22 ## v0.1.0 - 2024-03-22
Initial release Initial release

View file

@ -1,6 +1,6 @@
[package] [package]
name = "rustypipe" name = "rustypipe"
version = "0.1.0" version = "0.1.1"
edition.workspace = true edition.workspace = true
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

View file

@ -53,12 +53,12 @@ release crate="rustypipe":
CHANGELOG="CHANGELOG.md" CHANGELOG="CHANGELOG.md"
if [ "$CRATE" = "rustypipe" ]; then if [ "$CRATE" = "rustypipe" ]; then
INCLUDES="$INCLUDES --include-path src/** --include-path tests/** --include-path testfiles/**" INCLUDES="$INCLUDES --include-path 'src/**' --include-path 'tests/**' --include-path 'testfiles/**'"
else else
if [ ! -d "$CRATE" ]; then if [ ! -d "$CRATE" ]; then
echo "$CRATE does not exist."; exit 1 echo "$CRATE does not exist."; exit 1
fi fi
INCLUDES="$INCLUDES --include-path $CRATE/**" INCLUDES="$INCLUDES --include-path '$CRATE/**'"
CHANGELOG="$CRATE/$CHANGELOG" CHANGELOG="$CRATE/$CHANGELOG"
CRATE="rustypipe-$CRATE" # Add crate name prefix CRATE="rustypipe-$CRATE" # Add crate name prefix
fi fi
@ -69,12 +69,12 @@ release crate="rustypipe":
if git rev-parse "$TAG" >/dev/null 2>&1; then echo "version tag $TAG already exists"; exit 1; fi if git rev-parse "$TAG" >/dev/null 2>&1; then echo "version tag $TAG already exists"; exit 1; fi
CLIFF_ARGS="--tag v${VERSION} --tag-pattern ${CRATE}/* --unreleased $INCLUDES" CLIFF_ARGS="--tag 'v${VERSION}' --tag-pattern '${CRATE}/*' --unreleased $INCLUDES"
echo "git-cliff $CLIFF_ARGS" echo "git-cliff $CLIFF_ARGS"
if [ -f "$CHANGELOG" ]; then if [ -f "$CHANGELOG" ]; then
git-cliff $CLIFF_ARGS --prepend "$CHANGELOG" eval "git-cliff $CLIFF_ARGS --prepend '$CHANGELOG'"
else else
git-cliff $CLIFF_ARGS --output "$CHANGELOG" eval "git-cliff $CLIFF_ARGS --output '$CHANGELOG'"
fi fi
editor "$CHANGELOG" editor "$CHANGELOG"

View file

@ -36,7 +36,7 @@ Client for the public YouTube / YouTube Music API (Innertube), inspired by
```toml ```toml
[dependencies] [dependencies]
rustypipe = "0.1.0" rustypipe = "0.1.1"
tokio = { version = "1.20.0", features = ["macros", "rt-multi-thread"] } tokio = { version = "1.20.0", features = ["macros", "rt-multi-thread"] }
``` ```

View file

@ -73,7 +73,7 @@ commit_parsers = [
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" }, { message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" }, { message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" }, { message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^chore\\(release\\): prepare for", skip = true }, { message = "^chore\\(release\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true }, { message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true }, { message = "^chore\\(pull\\)", skip = true },
{ message = "^chore", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" }, { message = "^chore", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },

View file

@ -182,7 +182,7 @@ struct QContinuation<'a> {
continuation: &'a str, continuation: &'a str,
} }
const DEFAULT_UA: &str = "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"; const DEFAULT_UA: &str = "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0";
const CONSENT_COOKIE: &str = "SOCS=CAISAiAD"; const CONSENT_COOKIE: &str = "SOCS=CAISAiAD";

View file

@ -1,6 +1,5 @@
use serde::Deserialize; use serde::Deserialize;
use serde_with::serde_as; use serde_with::{serde_as, DefaultOnError, VecSkipError};
use serde_with::DefaultOnError;
use crate::serializer::text::Text; use crate::serializer::text::Text;
@ -36,9 +35,11 @@ pub(crate) struct TabbedRenderer {
pub watch_next_tabbed_results_renderer: TabbedRendererInner, pub watch_next_tabbed_results_renderer: TabbedRendererInner,
} }
#[serde_as]
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub(crate) struct TabbedRendererInner { pub(crate) struct TabbedRendererInner {
#[serde_as(as = "VecSkipError<_>")]
pub tabs: Vec<Tab>, pub tabs: Vec<Tab>,
} }

View file

@ -0,0 +1,26 @@
---
source: tests/youtube.rs
expression: track
---
TrackDetails(
track: TrackItem(
id: "1eekOcpx_iQ",
name: "NCT 127 \'Highway to Heaven\' NEO CITY Tour Film ver.",
duration: Some(202),
cover: "[cover]",
artists: [
ArtistId(
id: Some("UCk2E0dbAyEJWnrN2bbQOcbg"),
name: "NCT 127",
),
],
artist_id: Some("UCk2E0dbAyEJWnrN2bbQOcbg"),
album: None,
view_count: "[view_count]",
is_video: true,
track_nr: None,
by_va: false,
),
lyrics_id: None,
related_id: None,
)

View file

@ -2218,6 +2218,7 @@ async fn music_search_suggestion(
#[rstest] #[rstest]
#[case::mv("mv", "ZeerrnuLi5E")] #[case::mv("mv", "ZeerrnuLi5E")]
#[case::track("track", "qIZ-vvg-wiU")] #[case::track("track", "qIZ-vvg-wiU")]
#[case::track_details("track_details", "1eekOcpx_iQ")]
#[tokio::test] #[tokio::test]
async fn music_details(#[case] name: &str, #[case] id: &str, rp: RustyPipe) { async fn music_details(#[case] name: &str, #[case] id: &str, rp: RustyPipe) {
let track = rp.query().music_details(id).await.unwrap(); let track = rp.query().music_details(id).await.unwrap();