Compare commits
5 commits
f60b4bb1cd
...
8166af9e70
Author | SHA1 | Date | |
---|---|---|---|
8166af9e70 | |||
78ba9cb34c | |||
47e077e03b | |||
be314d57ea | |||
a81c3e8336 |
9 changed files with 49 additions and 11 deletions
10
CHANGELOG.md
10
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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "rustypipe"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition.workspace = true
|
||||
authors.workspace = true
|
||||
license.workspace = true
|
||||
|
|
10
Justfile
10
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"
|
||||
|
|
|
@ -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"] }
|
||||
```
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ commit_parsers = [
|
|||
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
|
||||
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
|
||||
{ message = "^test", group = "<!-- 6 -->🧪 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 = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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<Tab>,
|
||||
}
|
||||
|
||||
|
|
26
tests/snapshots/youtube__music_details_track_details.snap
Normal file
26
tests/snapshots/youtube__music_details_track_details.snap
Normal 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,
|
||||
)
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue