diff --git a/CHANGELOG.md b/CHANGELOG.md index bab248d..38e5256 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ 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 Initial release diff --git a/Cargo.toml b/Cargo.toml index b11a50d..6202e54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustypipe" -version = "0.1.0" +version = "0.1.1" edition.workspace = true authors.workspace = true license.workspace = true diff --git a/Justfile b/Justfile index 7821cce..6a3224a 100644 --- a/Justfile +++ b/Justfile @@ -53,12 +53,12 @@ release crate="rustypipe": CHANGELOG="CHANGELOG.md" 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 if [ ! -d "$CRATE" ]; then echo "$CRATE does not exist."; exit 1 fi - INCLUDES="$INCLUDES --include-path $CRATE/**" + INCLUDES="$INCLUDES --include-path '$CRATE/**'" CHANGELOG="$CRATE/$CHANGELOG" CRATE="rustypipe-$CRATE" # Add crate name prefix 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 - 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" if [ -f "$CHANGELOG" ]; then - git-cliff $CLIFF_ARGS --prepend "$CHANGELOG" + eval "git-cliff $CLIFF_ARGS --prepend '$CHANGELOG'" else - git-cliff $CLIFF_ARGS --output "$CHANGELOG" + eval "git-cliff $CLIFF_ARGS --output '$CHANGELOG'" fi editor "$CHANGELOG" diff --git a/README.md b/README.md index a24ccfb..626042d 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Client for the public YouTube / YouTube Music API (Innertube), inspired by ```toml [dependencies] -rustypipe = "0.1.0" +rustypipe = "0.1.1" tokio = { version = "1.20.0", features = ["macros", "rt-multi-thread"] } ``` diff --git a/cliff.toml b/cliff.toml index 32b679a..c175f64 100644 --- a/cliff.toml +++ b/cliff.toml @@ -73,7 +73,7 @@ commit_parsers = [ { message = "^refactor", group = "๐Ÿšœ Refactor" }, { message = "^style", group = "๐ŸŽจ Styling" }, { message = "^test", group = "๐Ÿงช Testing" }, - { message = "^chore\\(release\\): prepare for", skip = true }, + { message = "^chore\\(release\\)", skip = true }, { message = "^chore\\(pr\\)", skip = true }, { message = "^chore\\(pull\\)", skip = true }, { message = "^chore", group = "โš™๏ธ Miscellaneous Tasks" }, diff --git a/src/client/mod.rs b/src/client/mod.rs index 5b239c6..0203c3d 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -182,7 +182,7 @@ struct QContinuation<'a> { 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"; diff --git a/src/client/response/music_details.rs b/src/client/response/music_details.rs index 0d7e6d2..387f041 100644 --- a/src/client/response/music_details.rs +++ b/src/client/response/music_details.rs @@ -1,6 +1,5 @@ use serde::Deserialize; -use serde_with::serde_as; -use serde_with::DefaultOnError; +use serde_with::{serde_as, DefaultOnError, VecSkipError}; use crate::serializer::text::Text; @@ -36,9 +35,11 @@ pub(crate) struct TabbedRenderer { pub watch_next_tabbed_results_renderer: TabbedRendererInner, } +#[serde_as] #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] pub(crate) struct TabbedRendererInner { + #[serde_as(as = "VecSkipError<_>")] pub tabs: Vec, } diff --git a/tests/snapshots/youtube__music_details_track_details.snap b/tests/snapshots/youtube__music_details_track_details.snap new file mode 100644 index 0000000..f3c8f30 --- /dev/null +++ b/tests/snapshots/youtube__music_details_track_details.snap @@ -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, +) diff --git a/tests/youtube.rs b/tests/youtube.rs index a7a4391..84c6b08 100644 --- a/tests/youtube.rs +++ b/tests/youtube.rs @@ -2218,6 +2218,7 @@ async fn music_search_suggestion( #[rstest] #[case::mv("mv", "ZeerrnuLi5E")] #[case::track("track", "qIZ-vvg-wiU")] +#[case::track_details("track_details", "1eekOcpx_iQ")] #[tokio::test] async fn music_details(#[case] name: &str, #[case] id: &str, rp: RustyPipe) { let track = rp.query().music_details(id).await.unwrap();