diff --git a/Cargo.toml b/Cargo.toml index 8803f28..3beeed8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ quick-js-dtp = { version = "0.4.1", default-features = false, features = [ ] } once_cell = "1.12.0" regex = "1.6.0" -fancy-regex = "0.13.0" +fancy-regex = "0.12.0" thiserror = "1.0.36" url = "2.2.2" reqwest = { version = "0.11.11", default-features = false, features = [ diff --git a/src/client/channel.rs b/src/client/channel.rs index 85ecfb3..1907160 100644 --- a/src/client/channel.rs +++ b/src/client/channel.rs @@ -529,7 +529,7 @@ fn map_channel_content( .content .section_list_renderer .as_ref() - .and_then(|c| c.contents.c.first()) + .and_then(|c| c.contents.c.get(0)) { return Err(ExtractionError::Unavailable { reason: crate::error::UnavailabilityReason::AgeRestricted, diff --git a/src/client/music_playlist.rs b/src/client/music_playlist.rs index d3fb2a9..49350fb 100644 --- a/src/client/music_playlist.rs +++ b/src/client/music_playlist.rs @@ -327,7 +327,7 @@ impl MapResponse for response::MusicPlaylist { let year_txt = subtitle_split .swap_remove(2) .0 - .first() + .get(0) .map(|c| c.as_str().to_owned()); (year_txt, subtitle_split.try_swap_remove(1)) } diff --git a/src/client/response/mod.rs b/src/client/response/mod.rs index 47f0b81..237c930 100644 --- a/src/client/response/mod.rs +++ b/src/client/response/mod.rs @@ -335,14 +335,12 @@ impl From for Vec { impl From> for crate::model::Verification { fn from(badges: Vec) -> Self { - badges - .first() - .map_or(crate::model::Verification::None, |b| { - match b.metadata_badge_renderer.style { - ChannelBadgeStyle::BadgeStyleTypeVerified => Self::Verified, - ChannelBadgeStyle::BadgeStyleTypeVerifiedArtist => Self::Artist, - } - }) + badges.get(0).map_or(crate::model::Verification::None, |b| { + match b.metadata_badge_renderer.style { + ChannelBadgeStyle::BadgeStyleTypeVerified => Self::Verified, + ChannelBadgeStyle::BadgeStyleTypeVerifiedArtist => Self::Artist, + } + }) } } diff --git a/src/lib.rs b/src/lib.rs index 2f4fa34..e6868d8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,7 +3,6 @@ #![allow( clippy::doc_markdown, clippy::similar_names, - clippy::struct_field_names, clippy::items_after_statements, clippy::too_many_lines, clippy::module_name_repetitions, diff --git a/tests/snapshots/youtube__music_album_no_artist.snap b/tests/snapshots/youtube__music_album_no_artist.snap index eea1c14..60a3b5b 100644 --- a/tests/snapshots/youtube__music_album_no_artist.snap +++ b/tests/snapshots/youtube__music_album_no_artist.snap @@ -63,11 +63,11 @@ MusicAlbum( cover: [], artists: [ ArtistId( - id: Some("UCUhWwvF6gIPWTYlYb4-icLA"), + id: None, name: "L.r. Eswari", ), ], - artist_id: Some("UCUhWwvF6gIPWTYlYb4-icLA"), + artist_id: None, album: Some(AlbumId( id: "MPREb_bqWA6mAZFWS", name: "Pedha Rasi Peddamma Katha", diff --git a/tests/snapshots/youtube__music_album_no_artist_intl.snap b/tests/snapshots/youtube__music_album_no_artist_intl.snap index a8cefcf..c450608 100644 --- a/tests/snapshots/youtube__music_album_no_artist_intl.snap +++ b/tests/snapshots/youtube__music_album_no_artist_intl.snap @@ -63,11 +63,11 @@ MusicAlbum( cover: [], artists: [ ArtistId( - id: Some("UCUhWwvF6gIPWTYlYb4-icLA"), + id: None, name: "[name]", ), ], - artist_id: Some("UCUhWwvF6gIPWTYlYb4-icLA"), + artist_id: None, album: Some(AlbumId( id: "MPREb_bqWA6mAZFWS", name: "[name]", diff --git a/tests/snapshots/youtube__music_album_one_artist.snap b/tests/snapshots/youtube__music_album_one_artist.snap index 14f672c..25f4647 100644 --- a/tests/snapshots/youtube__music_album_one_artist.snap +++ b/tests/snapshots/youtube__music_album_one_artist.snap @@ -29,14 +29,6 @@ MusicAlbum( id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), name: "Demi Lovato", ), - ArtistId( - id: Some("UCKqVP7_535ELJu2OeEd3zzQ"), - name: "Missy Elliott", - ), - ArtistId( - id: Some("UCStR3TnjvL7CL8ZNFPKmRXw"), - name: "Timbaland", - ), ], artist_id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), album: Some(AlbumId( @@ -58,10 +50,6 @@ MusicAlbum( id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), name: "Demi Lovato", ), - ArtistId( - id: Some("UC58M_VmdxEw-h-p_HgeE0Zg"), - name: "Dev", - ), ], artist_id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), album: Some(AlbumId( @@ -83,10 +71,6 @@ MusicAlbum( id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), name: "Demi Lovato", ), - ArtistId( - id: Some("UC0tIFKS5uijPeJLjH8uAWJg"), - name: "Iyaz", - ), ], artist_id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), album: Some(AlbumId( @@ -108,10 +92,6 @@ MusicAlbum( id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), name: "Demi Lovato", ), - ArtistId( - id: Some("UCA7oqkXUZIlT8QXhxaIR4RA"), - name: "Jason Derulo", - ), ], artist_id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), album: Some(AlbumId( diff --git a/tests/snapshots/youtube__music_album_one_artist_intl.snap b/tests/snapshots/youtube__music_album_one_artist_intl.snap index d67935f..26c2e91 100644 --- a/tests/snapshots/youtube__music_album_one_artist_intl.snap +++ b/tests/snapshots/youtube__music_album_one_artist_intl.snap @@ -29,14 +29,6 @@ MusicAlbum( id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), name: "[name]", ), - ArtistId( - id: Some("UCKqVP7_535ELJu2OeEd3zzQ"), - name: "[name]", - ), - ArtistId( - id: Some("UCStR3TnjvL7CL8ZNFPKmRXw"), - name: "[name]", - ), ], artist_id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), album: Some(AlbumId( @@ -58,10 +50,6 @@ MusicAlbum( id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), name: "[name]", ), - ArtistId( - id: Some("UC58M_VmdxEw-h-p_HgeE0Zg"), - name: "[name]", - ), ], artist_id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), album: Some(AlbumId( @@ -83,10 +71,6 @@ MusicAlbum( id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), name: "[name]", ), - ArtistId( - id: Some("UC0tIFKS5uijPeJLjH8uAWJg"), - name: "[name]", - ), ], artist_id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), album: Some(AlbumId( @@ -108,10 +92,6 @@ MusicAlbum( id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), name: "[name]", ), - ArtistId( - id: Some("UCA7oqkXUZIlT8QXhxaIR4RA"), - name: "[name]", - ), ], artist_id: Some("UCwem2sj-QUJCiWiPAo9JuAw"), album: Some(AlbumId( diff --git a/tests/snapshots/youtube__music_album_show.snap b/tests/snapshots/youtube__music_album_show.snap index 570534a..43d312a 100644 --- a/tests/snapshots/youtube__music_album_show.snap +++ b/tests/snapshots/youtube__music_album_show.snap @@ -12,10 +12,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), description: None, @@ -33,10 +29,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -58,10 +50,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -83,10 +71,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -108,10 +92,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -133,10 +113,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -158,10 +134,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -183,10 +155,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -208,10 +176,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -233,10 +197,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -258,10 +218,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -283,10 +239,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -308,10 +260,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -333,10 +281,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -358,10 +302,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -383,10 +323,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -408,10 +344,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -433,10 +365,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -458,10 +386,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -483,10 +407,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -508,10 +428,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -533,10 +449,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -558,10 +470,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -583,10 +491,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -608,10 +512,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -633,10 +533,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -658,10 +554,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -683,10 +575,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "Dimiter Inkiow", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "Griechische Mythologie für Kinder", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( diff --git a/tests/snapshots/youtube__music_album_show_intl.snap b/tests/snapshots/youtube__music_album_show_intl.snap index 219157c..ff8113f 100644 --- a/tests/snapshots/youtube__music_album_show_intl.snap +++ b/tests/snapshots/youtube__music_album_show_intl.snap @@ -12,10 +12,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), description: "[description]", @@ -33,10 +29,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -58,10 +50,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -83,10 +71,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -108,10 +92,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -133,10 +113,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -158,10 +134,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -183,10 +155,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -208,10 +176,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -233,10 +197,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -258,10 +218,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -283,10 +239,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -308,10 +260,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -333,10 +281,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -358,10 +302,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -383,10 +323,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -408,10 +344,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -433,10 +365,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -458,10 +386,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -483,10 +407,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -508,10 +428,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -533,10 +449,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -558,10 +470,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -583,10 +491,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -608,10 +512,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -633,10 +533,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -658,10 +554,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( @@ -683,10 +575,6 @@ MusicAlbum( id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), name: "[name]", ), - ArtistId( - id: Some("UCsg6xTDzVnvrcWhgLYX6_rg"), - name: "[name]", - ), ], artist_id: Some("UCAotr_lJ3JJ79DPRlA7k47w"), album: Some(AlbumId( diff --git a/tests/snapshots/youtube__music_album_unavailable.snap b/tests/snapshots/youtube__music_album_unavailable.snap index 57bcba2..ef83f26 100644 --- a/tests/snapshots/youtube__music_album_unavailable.snap +++ b/tests/snapshots/youtube__music_album_unavailable.snap @@ -7,25 +7,12 @@ MusicAlbum( playlist_id: Some("OLAK5uy_mux5ygfN9sbiR1ma3yh1GHTmqNekZNoAI"), name: "13 Reasons Why (Season 3)", cover: "[cover]", - artists: [ - ArtistId( - id: Some("UCCj0RlDqqahEB5BXVtDcPqg"), - name: "5 Seconds of Summer", - ), - ArtistId( - id: Some("UCMrCoizKiBxqeg5pTpBXn1A"), - name: "YUNGBLUD", - ), - ArtistId( - id: Some("UCvsgN5NKOzXnAURfaf3TOig"), - name: "Alexander 23", - ), - ], - artist_id: Some("UCCj0RlDqqahEB5BXVtDcPqg"), + artists: [], + artist_id: None, description: None, album_type: Album, year: Some(2019), - by_va: false, + by_va: true, tracks: [ TrackItem( id: "R3VIKRtzAdE", @@ -264,16 +251,12 @@ MusicAlbum( duration: Some(246), cover: [], artists: [ - ArtistId( - id: Some("UCRBHsrbsZDxjHkcgMKEJwpw"), - name: "Brendan Angelides", - ), ArtistId( id: Some("UC4YvDAbE1EYwZpj6gQ-lpLw"), name: "Eskmo", ), ], - artist_id: Some("UCRBHsrbsZDxjHkcgMKEJwpw"), + artist_id: Some("UC4YvDAbE1EYwZpj6gQ-lpLw"), album: Some(AlbumId( id: "MPREb_AzuWg8qAVVl", name: "13 Reasons Why (Season 3)", diff --git a/tests/snapshots/youtube__music_album_unavailable_intl.snap b/tests/snapshots/youtube__music_album_unavailable_intl.snap index 36c8a58..cdf785d 100644 --- a/tests/snapshots/youtube__music_album_unavailable_intl.snap +++ b/tests/snapshots/youtube__music_album_unavailable_intl.snap @@ -7,25 +7,12 @@ MusicAlbum( playlist_id: Some("OLAK5uy_mux5ygfN9sbiR1ma3yh1GHTmqNekZNoAI"), name: "[name]", cover: "[cover]", - artists: [ - ArtistId( - id: Some("UCCj0RlDqqahEB5BXVtDcPqg"), - name: "[name]", - ), - ArtistId( - id: Some("UCMrCoizKiBxqeg5pTpBXn1A"), - name: "[name]", - ), - ArtistId( - id: Some("UCvsgN5NKOzXnAURfaf3TOig"), - name: "[name]", - ), - ], - artist_id: Some("UCCj0RlDqqahEB5BXVtDcPqg"), + artists: [], + artist_id: None, description: "[description]", album_type: Album, year: Some(2019), - by_va: false, + by_va: true, tracks: [ TrackItem( id: "R3VIKRtzAdE", @@ -264,16 +251,12 @@ MusicAlbum( duration: Some(246), cover: [], artists: [ - ArtistId( - id: Some("UCRBHsrbsZDxjHkcgMKEJwpw"), - name: "[name]", - ), ArtistId( id: Some("UC4YvDAbE1EYwZpj6gQ-lpLw"), name: "[name]", ), ], - artist_id: Some("UCRBHsrbsZDxjHkcgMKEJwpw"), + artist_id: Some("UC4YvDAbE1EYwZpj6gQ-lpLw"), album: Some(AlbumId( id: "MPREb_AzuWg8qAVVl", name: "[name]", diff --git a/tests/snapshots/youtube__music_album_various_artists.snap b/tests/snapshots/youtube__music_album_various_artists.snap index 75ffe38..eac36e1 100644 --- a/tests/snapshots/youtube__music_album_various_artists.snap +++ b/tests/snapshots/youtube__music_album_various_artists.snap @@ -105,11 +105,11 @@ MusicAlbum( cover: [], artists: [ ArtistId( - id: Some("UCa4ZqZPRjz9MYYnfpoh2few"), + id: None, name: "LOONA", ), ], - artist_id: Some("UCa4ZqZPRjz9MYYnfpoh2few"), + artist_id: None, album: Some(AlbumId( id: "MPREb_8QkDeEIawvX", name: "<Queendom2> FINAL", diff --git a/tests/snapshots/youtube__music_album_various_artists_intl.snap b/tests/snapshots/youtube__music_album_various_artists_intl.snap index 6215266..f44751e 100644 --- a/tests/snapshots/youtube__music_album_various_artists_intl.snap +++ b/tests/snapshots/youtube__music_album_various_artists_intl.snap @@ -105,11 +105,11 @@ MusicAlbum( cover: [], artists: [ ArtistId( - id: Some("UCa4ZqZPRjz9MYYnfpoh2few"), + id: None, name: "[name]", ), ], - artist_id: Some("UCa4ZqZPRjz9MYYnfpoh2few"), + artist_id: None, album: Some(AlbumId( id: "MPREb_8QkDeEIawvX", name: "[name]", diff --git a/tests/snapshots/youtube__music_artist_basic_all_intl.snap b/tests/snapshots/youtube__music_artist_basic_all_intl.snap index 4a7ad20..7e30c47 100644 --- a/tests/snapshots/youtube__music_artist_basic_all_intl.snap +++ b/tests/snapshots/youtube__music_artist_basic_all_intl.snap @@ -146,21 +146,6 @@ MusicArtist( year: Some(2015), by_va: false, ), - AlbumItem( - id: "MPREb_ghrNI6BJSM8", - name: "[name]", - cover: "[cover]", - artists: [ - ArtistId( - id: Some("UCFKUUtHjT4iq3p0JJA13SOA"), - name: "[name]", - ), - ], - artist_id: Some("UCFKUUtHjT4iq3p0JJA13SOA"), - album_type: Album, - year: Some(2017), - by_va: false, - ), AlbumItem( id: "MPREb_h0UZr2ALQXf", name: "[name]", diff --git a/tests/youtube.rs b/tests/youtube.rs index 1207df8..ded1a58 100644 --- a/tests/youtube.rs +++ b/tests/youtube.rs @@ -827,7 +827,6 @@ fn channel_videos(rp: RustyPipe) { } #[rstest] -#[ignore] fn channel_shorts(rp: RustyPipe) { let channel = tokio_test::block_on( rp.query() @@ -1007,9 +1006,8 @@ fn channel_more( #[rstest] #[case::videos("UCcdwLMPsaU2ezNSJU1nFoBQ", ChannelVideoTab::Videos)] -#[case::live("UCvqRdlKsE5Q8mf8YXbdIJLw", ChannelVideoTab::Live)] -#[ignore] #[case::shorts("UCcdwLMPsaU2ezNSJU1nFoBQ", ChannelVideoTab::Shorts)] +#[case::live("UCvqRdlKsE5Q8mf8YXbdIJLw", ChannelVideoTab::Live)] fn channel_order_latest(#[case] id: &str, #[case] tab: ChannelVideoTab, rp: RustyPipe) { let latest = tokio_test::block_on(rp.query().channel_videos_tab_order( id, @@ -1035,9 +1033,8 @@ fn channel_order_latest(#[case] id: &str, #[case] tab: ChannelVideoTab, rp: Rust #[rstest] #[case::videos("UCcdwLMPsaU2ezNSJU1nFoBQ", ChannelVideoTab::Videos, "XqZsoesa55w")] -#[case::live("UCvqRdlKsE5Q8mf8YXbdIJLw", ChannelVideoTab::Live, "ojes5ULOqhc")] -#[ignore] #[case::shorts("UCcdwLMPsaU2ezNSJU1nFoBQ", ChannelVideoTab::Shorts, "k91vRvXGwHs")] +#[case::live("UCvqRdlKsE5Q8mf8YXbdIJLw", ChannelVideoTab::Live, "ojes5ULOqhc")] fn channel_order_popular( #[case] id: &str, #[case] tab: ChannelVideoTab,