feat: add lyrics

This commit is contained in:
ThetaDev 2022-11-11 00:14:58 +01:00
parent dae8c1e775
commit 2cd74b1da8
12 changed files with 262 additions and 10 deletions

View file

@ -0,0 +1,8 @@
---
source: tests/youtube.rs
expression: lyrics
---
Lyrics(
body: "Eyes, in the sky, gazing far into the night\nI raise my hand to the fire, but it\'s no use\n\'Cause you can\'t stop it from shining through\nIt\'s true\nBaby let the light shine through\nIf you believe it\'s true\nBaby won\'t you let the light shine through\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you\nWon\'t you let the light shine through\n\nEyes, in the sky, gazing far into the night\nI raise my hand to the fire, but it\'s no use\n\'Cause you can\'t stop it from shining through\nIt\'s true\nBaby let the light shine through\nIf you believe it\'s true\nBaby won\'t you let the light shine through\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you\nFor you",
footer: "Source: Musixmatch",
)

View file

@ -1769,6 +1769,18 @@ async fn music_details(#[case] name: &str, #[case] id: &str) {
);
}
#[tokio::test]
async fn music_lyrics() {
let rp = RustyPipe::builder().strict().build();
let track = rp.query().music_details("n4tK7LYFxI0").await.unwrap();
let lyrics = rp
.query()
.music_lyrics(&track.lyrics_id.unwrap())
.await
.unwrap();
insta::assert_ron_snapshot!(lyrics);
}
#[tokio::test]
async fn music_radio_track() {
let rp = RustyPipe::builder().strict().build();