diff --git a/Justfile b/Justfile index 9852566..00a9d7d 100644 --- a/Justfile +++ b/Justfile @@ -19,7 +19,8 @@ testintl: #!/usr/bin/env bash set -e LANGUAGES=( - "af" "am" "ar" "as" "az" "be" "bg" "bn" "bs" "ca" "cs" "da" "de" "el" "en" "en-GB" "en-IN" + "af" "am" "ar" "as" "az" "be" "bg" "bn" "bs" "ca" "cs" "da" "de" "el" + "en" "en-GB" "en-IN" "es" "es-419" "es-US" "et" "eu" "fa" "fi" "fil" "fr" "fr-CA" "gl" "gu" "hi" "hr" "hu" "hy" "id" "is" "it" "iw" "ja" "ka" "kk" "km" "kn" "ko" "ky" "lo" "lt" "lv" "mk" "ml" "mn" "mr" "ms" "my" "ne" "nl" "no" "or" "pa" "pl" diff --git a/codegen/src/collect_playlist_dates.rs b/codegen/src/collect_playlist_dates.rs index b791631..01d68cc 100644 --- a/codegen/src/collect_playlist_dates.rs +++ b/codegen/src/collect_playlist_dates.rs @@ -66,8 +66,8 @@ pub async fn collect_dates(concurrency: usize) { // These are the sample playlists let cases = [ (DateCase::Today, "PLMC9KNkIncKtPzgY-5rmhvj7fax8fdxoj"), - (DateCase::Yesterday, "PLcirGkCPmbmFeQ1sm4wFciF03D_EroIfr"), - (DateCase::Ago, "PLmB6td997u3kUOrfFwkULZ910ho44oQSy"), + (DateCase::Yesterday, "PL3oW2tjiIxvQ98ZTLhBh5soCbE1mC3uAT"), + (DateCase::Ago, "PLeDakahyfrO9Amk2GFrzpI4UWOkgqzoIE"), (DateCase::Jan, "PL1J-6JOckZtFjcni6Xj1pLYglJp6JCpKD"), (DateCase::Feb, "PL1J-6JOckZtETrbzwZE7mRIIK6BzWNLAs"), (DateCase::Mar, "PL1J-6JOckZtG3AVdvBXhMO64mB2k3BtKi"), diff --git a/src/client/response/music_item.rs b/src/client/response/music_item.rs index 7d9f6ea..67c54b0 100644 --- a/src/client/response/music_item.rs +++ b/src/client/response/music_item.rs @@ -208,7 +208,9 @@ pub(crate) struct CoverMusicItem { /// /// `"2022"` Artist singles /// - /// `"Playlist", " • ", <"ThetaDev"> " • ", "26 songs"` + /// `"Playlist", " • ", <"YouTube Music"> " • ", "53 songs"` + /// + /// `"Playlist", " • ", <"Vevo Playlists"> " • ", "13M views"` /// /// `"Playlist", " • ", "YouTube Music" Featured on #[serde(default)] @@ -737,8 +739,9 @@ impl MusicListMapper { let channel = channel_p.and_then(|p| { p.0.into_iter().find_map(|c| ChannelId::try_from(c).ok()) }); - let track_count = - tcount_p.and_then(|p| util::parse_numeric(p.first_str()).ok()); + let track_count = tcount_p + .filter(|_| from_ytm) + .and_then(|p| util::parse_numeric(p.first_str()).ok()); self.items.push(MusicItem::Playlist(MusicPlaylistItem { id, @@ -772,7 +775,6 @@ impl MusicListMapper { let mut subtitle_parts = item.subtitle.split(util::DOT_SEPARATOR).into_iter(); let subtitle_p1 = subtitle_parts.next(); let subtitle_p2 = subtitle_parts.next(); - let subtitle_p3 = subtitle_parts.next(); match item.navigation_endpoint.music_page() { Some((page_type, id)) => match page_type { @@ -879,15 +881,13 @@ impl MusicListMapper { let channel = subtitle_p2.and_then(|p| { p.0.into_iter().find_map(|c| ChannelId::try_from(c).ok()) }); - let track_count = - subtitle_p3.and_then(|p| util::parse_numeric(p.first_str()).ok()); self.items.push(MusicItem::Playlist(MusicPlaylistItem { id, name: item.title, thumbnail: item.thumbnail_renderer.into(), channel, - track_count, + track_count: None, from_ytm, })); Ok(Some(MusicItemType::Playlist)) diff --git a/src/client/response/video_item.rs b/src/client/response/video_item.rs index dba27be..a46d8dc 100644 --- a/src/client/response/video_item.rs +++ b/src/client/response/video_item.rs @@ -1,3 +1,5 @@ +use once_cell::sync::Lazy; +use regex::Regex; use serde::Deserialize; use serde_with::{ json::JsonString, rust::deserialize_ignore_any, serde_as, DefaultOnError, VecSkipError, @@ -382,6 +384,10 @@ impl IsShort for Vec { } } +static ACCESSIBILITY_SEP_REGEX: Lazy = Lazy::new(|| { + Regex::new("(?:[ \u{00a0}][-\u{2013}\u{2014}] )|\u{2013}|(?:\u{055d} )|(?:\", )").unwrap() +}); + /// Result of mapping a list of different YouTube enities /// (videos, channels, playlists) #[derive(Debug)] @@ -496,14 +502,29 @@ impl YouTubeListMapper { .timestamp_text }); + let length = video.accessibility.and_then(|acc| { + let parts = ACCESSIBILITY_SEP_REGEX.split(&acc).collect::>(); + if parts.len() > 2 { + let i = match lang { + Language::Ru => 1, + _ => 2, + }; + timeago::parse_video_duration_or_warn( + self.lang, + parts[parts.len() - i], + &mut self.warnings, + ) + } else { + self.warnings + .push(format!("could not split video duration `{acc}`")); + None + } + }); + VideoItem { id: video.video_id, name: video.headline, - length: video.accessibility.and_then(|acc| { - acc.rsplit(" - ").nth(1).and_then(|s| { - timeago::parse_video_duration_or_warn(self.lang, s, &mut self.warnings) - }) - }), + length, thumbnail: video.thumbnail.into(), channel: self.channel.clone(), publish_date: pub_date_txt.as_ref().and_then(|txt| { @@ -704,3 +725,50 @@ impl YouTubeListMapper { res.c.into_iter().for_each(|item| self.map_item(item)); } } + +#[cfg(test)] +mod tests { + use super::ACCESSIBILITY_SEP_REGEX; + + use rstest::rstest; + + #[rstest] + #[case::af( + "BTS - Permission to Dance Cover #shorts #pinkfong – 50 sekondes – speel video", + "50 sekondes" + )] + #[case::de( + "Point of view: Me VS My mom #shorts – 8 Sekunden – Video wiedergeben", + "8 Sekunden" + )] + #[case::be( + "Point of view: Me VS My mom #shorts–8 секунд – прайграць відэа", + "8 секунд" + )] + #[case::fil("do u wanna get swole? - 53 segundo - i-play ang video", "53 segundo")] + #[case::ar( + "«the holy trinity of korean street food»՝ 1 րոպե՝ նվագարկել տեսանյութը", + "1 րոպե" + )] + #[case::lv( + "what i ate in google japan — 1 minūte — atskaņot videoklipu", + "1 minūte" + )] + #[case::sq("When you impulse buy... - 1 minutë - luaj videon", "1 minutë")] + #[case::uk( + "\"Point of view: Me VS My mom #shorts\", 8 секунд – відтворити відео", + "8 секунд" + )] + // INFO: sw is unparseable "coming soonsekunde 58 - cheza video" + fn split_duration_txt(#[case] s: &str, #[case] expect: &str) { + let parts = ACCESSIBILITY_SEP_REGEX.split(s).collect::>(); + assert_eq!(parts[parts.len() - 2], expect); + } + + #[test] + fn split_duration_txt_ru() { + let s = "Воспроизвести видео – \"the holy trinity of korean street food\". Его продолжительность – 1 минута."; + let parts = ACCESSIBILITY_SEP_REGEX.split(s).collect::>(); + assert_eq!(parts[parts.len() - 1], "1 минута."); + } +} diff --git a/src/client/snapshots/rustypipe__client__music_artist__tests__map_music_artist_no_artist.snap b/src/client/snapshots/rustypipe__client__music_artist__tests__map_music_artist_no_artist.snap index 550394f..447d735 100644 --- a/src/client/snapshots/rustypipe__client__music_artist__tests__map_music_artist_no_artist.snap +++ b/src/client/snapshots/rustypipe__client__music_artist__tests__map_music_artist_no_artist.snap @@ -57,7 +57,7 @@ MusicArtist( id: "UCh8gHdtzO2tXd593_bjErWg", name: "Doobydobap", )), - track_count: Some(6), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -79,7 +79,7 @@ MusicArtist( id: "UCh8gHdtzO2tXd593_bjErWg", name: "Doobydobap", )), - track_count: Some(59), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -101,7 +101,7 @@ MusicArtist( id: "UCh8gHdtzO2tXd593_bjErWg", name: "Doobydobap", )), - track_count: Some(10), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -123,7 +123,7 @@ MusicArtist( id: "UCh8gHdtzO2tXd593_bjErWg", name: "Doobydobap", )), - track_count: Some(12), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -145,7 +145,7 @@ MusicArtist( id: "UCh8gHdtzO2tXd593_bjErWg", name: "Doobydobap", )), - track_count: Some(40), + track_count: None, from_ytm: false, ), ], diff --git a/src/client/snapshots/rustypipe__client__music_details__tests__map_music_related.snap b/src/client/snapshots/rustypipe__client__music_details__tests__map_music_related.snap index 573a41e..b26d5de 100644 --- a/src/client/snapshots/rustypipe__client__music_details__tests__map_music_related.snap +++ b/src/client/snapshots/rustypipe__client__music_details__tests__map_music_related.snap @@ -989,7 +989,7 @@ MusicRelated( id: "UCteCDkIcXeK0Hy2jfDyjAvg", name: "느양이", )), - track_count: Some(24), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1011,7 +1011,7 @@ MusicRelated( id: "UCMbDcEEUG_qlfEWuEmSWK4w", name: "몰라", )), - track_count: Some(26), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1033,7 +1033,7 @@ MusicRelated( id: "UCbP0WNlLgrnjAm4bBayYCHg", name: "zekeira Jackson", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1055,7 +1055,7 @@ MusicRelated( id: "UCt0wIbpQkTfojRTMm0c7fVg", name: "Ashlyn Anahí Perez xitumul", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1077,7 +1077,7 @@ MusicRelated( id: "UCceFVAj8BxG0_aLdypfdcew", name: "YANA24", )), - track_count: Some(48), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1099,7 +1099,7 @@ MusicRelated( id: "UCX-Fmn_USQ2PuFxnibdv_tw", name: "BLÆZY", )), - track_count: Some(29), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1121,7 +1121,7 @@ MusicRelated( id: "UCC2CZv7mdAkCbwHH10c9m9g", name: "aideed razali", )), - track_count: Some(27), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1143,7 +1143,7 @@ MusicRelated( id: "UCAR5UBWbSjZZojV4q5jBuPw", name: "Terry Zarrato", )), - track_count: Some(26), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1165,7 +1165,7 @@ MusicRelated( id: "UCSd74nw3xjGGyBQ4I7-vAVQ", name: "Changmin Park", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1187,7 +1187,7 @@ MusicRelated( id: "UC2XFk1E2pia0DH8iZHWX7uQ", name: "Gorgeous_Celebs", )), - track_count: Some(22), + track_count: None, from_ytm: false, ), ], diff --git a/src/client/snapshots/rustypipe__client__music_genres__tests__map_music_genre_default.snap b/src/client/snapshots/rustypipe__client__music_genres__tests__map_music_genre_default.snap index 3adb8f9..30f9847 100644 --- a/src/client/snapshots/rustypipe__client__music_genres__tests__map_music_genre_default.snap +++ b/src/client/snapshots/rustypipe__client__music_genres__tests__map_music_genre_default.snap @@ -630,7 +630,7 @@ MusicGenre( id: "UCJCV-S6ahhblGOHwJy7OC_Q", name: "Toda James", )), - track_count: Some(50), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -652,7 +652,7 @@ MusicGenre( id: "UCF6caQme6smAwcss8ytDZlA", name: "Christina Bramsnæs", )), - track_count: Some(66), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -674,7 +674,7 @@ MusicGenre( id: "UCjNbfn7je1FaoB5jTku0FmQ", name: "Dolev Revah", )), - track_count: Some(40), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -696,7 +696,7 @@ MusicGenre( id: "UCRpTJcl_StTLn1zsMlS8YIg", name: "TheAdventurer64", )), - track_count: Some(30), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -718,7 +718,7 @@ MusicGenre( id: "UCqPO5RAnOmft43Rup8olJWQ", name: "Reneé Herrera", )), - track_count: Some(23), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -740,7 +740,7 @@ MusicGenre( id: "UC8JEZU4gc5sGplOXJ0qZ6tA", name: "Samantha Tatro", )), - track_count: Some(38), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -762,7 +762,7 @@ MusicGenre( id: "UCI92PaJYiZZUfG1QuRv6B7A", name: "Lana Nahapetian", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -784,7 +784,7 @@ MusicGenre( id: "UCF7UgBjfLY3g5Zc2mNu0mkw", name: "Justin Longoria", )), - track_count: Some(20), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -806,7 +806,7 @@ MusicGenre( id: "UCKZrE1VncRq36wPg7uTz_Qw", name: "laurance Spruell", )), - track_count: Some(61), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -828,7 +828,7 @@ MusicGenre( id: "UC8CQiVn5TFf2-2RaPFRlhXA", name: "Greg Duke", )), - track_count: Some(22), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -850,7 +850,7 @@ MusicGenre( id: "UCFKz3UmRXuTOi9FIABqDpEA", name: "Randy Gardner Jr.", )), - track_count: Some(28), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -872,7 +872,7 @@ MusicGenre( id: "UCDs46pTxZxx_4bCB74pRSAg", name: "83Roll", )), - track_count: Some(51), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -894,7 +894,7 @@ MusicGenre( id: "UCn3bJLS5LaAkpjveSIxUVXQ", name: "Bassin-N-NC", )), - track_count: Some(91), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -916,7 +916,7 @@ MusicGenre( id: "UCaxg7nT_axJdagTP0Hy3sxw", name: "Franzi Re", )), - track_count: Some(79), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -938,7 +938,7 @@ MusicGenre( id: "UCNUJdLrjgaXTT32gaBG7SsA", name: "Seth leGassick", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -960,7 +960,7 @@ MusicGenre( id: "UCG5YLvlq4wR0IHlGMgyOU-Q", name: "Charleen Röhr", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -982,7 +982,7 @@ MusicGenre( id: "UCfzNJcAMUWrFxXRZJlKWipQ", name: "Maddie Sriphin", )), - track_count: Some(64), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1004,7 +1004,7 @@ MusicGenre( id: "UCpoD1__eSOKJ8BbPjQPcIfA", name: "Owen Barrett", )), - track_count: Some(76), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1026,7 +1026,7 @@ MusicGenre( id: "UCv12vedVVfnF6U6CPHVDJcA", name: "Lea Christoph", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1048,7 +1048,7 @@ MusicGenre( id: "UC4Z69GjIpvwlGrMAoqinERw", name: "Sayuri Naidu", )), - track_count: Some(22), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1070,7 +1070,7 @@ MusicGenre( id: "UCaL3Kg7MNY1qf-pY1MhHCxA", name: "David Jones", )), - track_count: Some(26), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1092,7 +1092,7 @@ MusicGenre( id: "UCNRpUvXNTvKIqUj1V_QE0kA", name: "Mihail Hristov", )), - track_count: Some(22), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1114,7 +1114,7 @@ MusicGenre( id: "UCLiNI2qE27UsxaWcOnbSwJg", name: "Hiedfeld Rio_", )), - track_count: Some(30), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1136,7 +1136,7 @@ MusicGenre( id: "UC7KYnk7TDG0r_nLhwlt_YJg", name: "masa 0526", )), - track_count: Some(38), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1158,7 +1158,7 @@ MusicGenre( id: "UC1YC4Iqn3J_EdEC2iHKyxUg", name: "Danny Esquivel", )), - track_count: Some(53), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1180,7 +1180,7 @@ MusicGenre( id: "UC51CMnsDOYDJxh4MjC8Zvrg", name: "Danilo Neres", )), - track_count: Some(50), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1202,7 +1202,7 @@ MusicGenre( id: "UCv3CeWGxETxrjWIRroRqtPw", name: "Christine Funk", )), - track_count: Some(46), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1224,7 +1224,7 @@ MusicGenre( id: "UCFNN2IqDVou0NiQrkOBMCKQ", name: "Drohnenflug", )), - track_count: Some(21), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1246,7 +1246,7 @@ MusicGenre( id: "UCCIWYh932q1o_NKqsOoTGkQ", name: "Franz Thomas", )), - track_count: Some(28), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1268,7 +1268,7 @@ MusicGenre( id: "UC-YDdf6aAneAHM88HfPpkgQ", name: "simon burger", )), - track_count: Some(61), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1290,7 +1290,7 @@ MusicGenre( id: "UCYWZ-fb1VMTPaTyIoA9kTvA", name: "Cara W", )), - track_count: Some(24), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1312,7 +1312,7 @@ MusicGenre( id: "UCe2FSIeyh1HoslXjYa8lS2g", name: "alessia tarola", )), - track_count: Some(47), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1334,7 +1334,7 @@ MusicGenre( id: "UCUlKZY0Ih0nD5wPA7a4bUKQ", name: "Michael Burgmann", )), - track_count: Some(65), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1356,7 +1356,7 @@ MusicGenre( id: "UCiZeZc6NSpvNDoOTq3avrOg", name: "Katherine Vorster", )), - track_count: Some(36), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1378,7 +1378,7 @@ MusicGenre( id: "UClnxEIy62BJHlLHJsn6-vjg", name: "Colin Johnston", )), - track_count: Some(20), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1400,7 +1400,7 @@ MusicGenre( id: "UCuLltIgY3qcmN4-WFI7UrHA", name: "Sheeka Spencer", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1422,7 +1422,7 @@ MusicGenre( id: "UCqH_eIvdqn03UxrLGwmvI8A", name: "Amanda Meyers", )), - track_count: Some(41), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1444,7 +1444,7 @@ MusicGenre( id: "UCQ04tL7ApAXFKN7pBK-tqrA", name: "Robert Heilhausen", )), - track_count: Some(40), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1466,7 +1466,7 @@ MusicGenre( id: "UCAtzlFsd4PVR3M05rmqCy9A", name: "Katj Wenners", )), - track_count: Some(40), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1488,7 +1488,7 @@ MusicGenre( id: "UC_zE0Tvp_jaoi6fHrMdlYhQ", name: "Stephanie Wix", )), - track_count: Some(22), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1510,7 +1510,7 @@ MusicGenre( id: "UCGHgI4LHsQYiOF2aGeDnlvw", name: "Benjamin C", )), - track_count: Some(41), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1532,7 +1532,7 @@ MusicGenre( id: "UCtY8DPBGKcqlsjW3kIakFnQ", name: "Михаил Пак", )), - track_count: Some(51), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1554,7 +1554,7 @@ MusicGenre( id: "UCk-Q3xTEjPOPYNYXF9Xg1gg", name: "Geekus", )), - track_count: Some(24), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1576,7 +1576,7 @@ MusicGenre( id: "UCeMJVtiyjKv5p9mvuF7ztbA", name: "Jennifer R", )), - track_count: Some(72), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1598,7 +1598,7 @@ MusicGenre( id: "UCzrlzOlA6Vf0jQl2--7vaEw", name: "Jessie Daniel", )), - track_count: Some(27), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1620,7 +1620,7 @@ MusicGenre( id: "UCSOsRIc_G4LAeH_ws76KR0Q", name: "David Lopez", )), - track_count: Some(94), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1642,7 +1642,7 @@ MusicGenre( id: "UCkW7HHW14r3ojZgOvWKAcJg", name: "Andi Kofler", )), - track_count: Some(64), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1664,7 +1664,7 @@ MusicGenre( id: "UCqVTSKemRi_xJy5k9C3W0KQ", name: "Colin Simmons", )), - track_count: Some(22), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1686,7 +1686,7 @@ MusicGenre( id: "UCbqW-bEvAkOl9ijzfaVpfKQ", name: "Damia Nap", )), - track_count: Some(50), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1708,7 +1708,7 @@ MusicGenre( id: "UCa6FBcbtSFb_DEwijovUFXA", name: "Arthur Haltrich", )), - track_count: Some(29), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1730,7 +1730,7 @@ MusicGenre( id: "UCfi844W_auiXMpLQ0Nq_szw", name: "Pierre Renaud", )), - track_count: Some(35), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1752,7 +1752,7 @@ MusicGenre( id: "UCWa5zj5HImGAkSNgj3MA-ew", name: "Will Hoover", )), - track_count: Some(20), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1774,7 +1774,7 @@ MusicGenre( id: "UCvICPM6-tP32Ry885PFapeQ", name: "Jennifer Bower", )), - track_count: Some(99), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1796,7 +1796,7 @@ MusicGenre( id: "UCoUP8HE3A4e9BX1uzj-KLQw", name: "George Ghazi", )), - track_count: Some(26), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1818,7 +1818,7 @@ MusicGenre( id: "UC4fW7efcYs1lW-U2YzzWKfw", name: "jakirin nelson", )), - track_count: Some(23), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1840,7 +1840,7 @@ MusicGenre( id: "UCUrCJfKzyqH-ZFASlDAG4kA", name: "Mathilde Leite Kallevik", )), - track_count: Some(41), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1862,7 +1862,7 @@ MusicGenre( id: "UC9Cv6cOlV89apQybdvY--bQ", name: "just.pia.nicole", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1884,7 +1884,7 @@ MusicGenre( id: "UCjea1k_El-7W7aSfQ-z6HKw", name: "Ferhat Cevik", )), - track_count: Some(24), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1906,7 +1906,7 @@ MusicGenre( id: "UCjMDVXCnWkKTFR64ZTIcVbg", name: "Andreas Duttwyler", )), - track_count: Some(27), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1928,7 +1928,7 @@ MusicGenre( id: "UCUScjTsAqtYz6KKgFXhS6Dw", name: "Flexi Kroll", )), - track_count: Some(33), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1950,7 +1950,7 @@ MusicGenre( id: "UCjKnKqNBHh5FnftLCAJVdNA", name: "Chelsey Taylor", )), - track_count: Some(35), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1972,7 +1972,7 @@ MusicGenre( id: "UCM2BDhQJH2XpanhhBF1gM-Q", name: "mers smith", )), - track_count: Some(83), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -1994,7 +1994,7 @@ MusicGenre( id: "UCYblPTQ9-orNCMYOJujebsg", name: "Solo Serio", )), - track_count: Some(50), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2016,7 +2016,7 @@ MusicGenre( id: "UCAwYkZc16XduG5UtwKTmZfQ", name: "JMANzLegit", )), - track_count: Some(86), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2038,7 +2038,7 @@ MusicGenre( id: "UCdvrXv8UJzcTD-NSd8KSB0A", name: "Prince Zondo", )), - track_count: Some(23), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2060,7 +2060,7 @@ MusicGenre( id: "UCfwjgiQkMWPkLt-OUbMvTLQ", name: "Peter Bigg", )), - track_count: Some(89), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2082,7 +2082,7 @@ MusicGenre( id: "UClZzccOxk4a-dlYbY8EUiQw", name: "Scott Jones", )), - track_count: Some(54), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2104,7 +2104,7 @@ MusicGenre( id: "UCzL2oHQUhhiRye2NPvNtFTg", name: "Nils Lang", )), - track_count: Some(24), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2126,7 +2126,7 @@ MusicGenre( id: "UC114_mB5mkLlielmJZpc2XQ", name: "Илья Светлаков", )), - track_count: Some(89), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2148,7 +2148,7 @@ MusicGenre( id: "UCAH_OgnmnfZ4q4-X9RLkBjA", name: "chastity hampstead", )), - track_count: Some(20), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2170,7 +2170,7 @@ MusicGenre( id: "UCjNsWQSS7ciWk0JgRDObCCg", name: "Colin Bodger", )), - track_count: Some(92), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2192,7 +2192,7 @@ MusicGenre( id: "UCcUcb_7OR3k1UDoyL19ID6A", name: "Bernd Page", )), - track_count: Some(52), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2214,7 +2214,7 @@ MusicGenre( id: "UC0eJsV0Q9x4vNuJdD1JCgkA", name: "Mauro Carrera", )), - track_count: Some(50), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2236,7 +2236,7 @@ MusicGenre( id: "UCRz7RHjFbynvzcHtDrWyokQ", name: "Fabian H", )), - track_count: Some(26), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2258,7 +2258,7 @@ MusicGenre( id: "UCQMAlPb4QcCvpAp0qSB3aOw", name: "Лале Салимова", )), - track_count: Some(26), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2280,7 +2280,7 @@ MusicGenre( id: "UC79nGD5tzdvrWQur06jBZ9Q", name: "german kohnenkamp", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2302,7 +2302,7 @@ MusicGenre( id: "UCECHtDZha-qA9SAV9eMle8A", name: "Jamie Hansen", )), - track_count: Some(65), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2324,7 +2324,7 @@ MusicGenre( id: "UC8uh9_gLI8LptXKb10THfHw", name: "Daniel Terbush", )), - track_count: Some(86), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2346,7 +2346,7 @@ MusicGenre( id: "UCguU0xY2_eWnHhQaX4q19RA", name: "d.n", )), - track_count: Some(20), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2368,7 +2368,7 @@ MusicGenre( id: "UCPxMgXwB6ZwMqGaMuXdKtDQ", name: "Otto Wilhelm Köper", )), - track_count: Some(30), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2390,7 +2390,7 @@ MusicGenre( id: "UCRT8AW_u_kUMtP-a_2aVL7A", name: "Ayokunmi Aina", )), - track_count: Some(20), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2412,7 +2412,7 @@ MusicGenre( id: "UCsuaH8Ax3Wi6eREaOZyrebg", name: "Sarah Hook", )), - track_count: Some(91), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2434,7 +2434,7 @@ MusicGenre( id: "UCYGmCXupuYMcuMiaeHbiY0w", name: "Kian Tajada", )), - track_count: Some(30), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2456,7 +2456,7 @@ MusicGenre( id: "UCyWaLLPSNuyR2dNKw4bo2Ng", name: "Luis Martin Maceda Nazario", )), - track_count: Some(49), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2478,7 +2478,7 @@ MusicGenre( id: "UCVcIOeSdYPeJhZrpll-i9ow", name: "Alejandro Volkman", )), - track_count: Some(23), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2500,7 +2500,7 @@ MusicGenre( id: "UC3vjRDguM37Fk1GM-f7wc9g", name: "Ellie Kampwerth", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2522,7 +2522,7 @@ MusicGenre( id: "UC67qD0L9GgKweULcSkhGVog", name: "Katie Murphy", )), - track_count: Some(65), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2544,7 +2544,7 @@ MusicGenre( id: "UCEMJeNR04nFGETFun4Q0Nmw", name: "Veronica Bonilla", )), - track_count: Some(55), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2566,7 +2566,7 @@ MusicGenre( id: "UCYO-DRRQJj_cW16nhl0q4Mw", name: "Tyler Antikainen", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2588,7 +2588,7 @@ MusicGenre( id: "UC2MJkgRWYnnvb_Y3G3Wh9Rg", name: "Michael Mende", )), - track_count: Some(28), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2610,7 +2610,7 @@ MusicGenre( id: "UCd5PloM5KzSwDlguTnH9vkA", name: "Aarav Gupta", )), - track_count: Some(41), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2632,7 +2632,7 @@ MusicGenre( id: "UCzEPFFjku1_2dYUu10HJ4eg", name: "Miriam Perner", )), - track_count: Some(49), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2654,7 +2654,7 @@ MusicGenre( id: "UC1izA3A5f3v6qiM053p5lyg", name: "Uriana Burrell", )), - track_count: Some(73), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2676,7 +2676,7 @@ MusicGenre( id: "UCjuu_fE95a2M6WyrHwcF7RQ", name: "Sheree Martin", )), - track_count: Some(49), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2698,7 +2698,7 @@ MusicGenre( id: "UCpCqOLdeTga8LoEcQe1V4Qg", name: "Chris Furmanek", )), - track_count: Some(33), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2720,7 +2720,7 @@ MusicGenre( id: "UCoJI2GPf80lr2esYWFOYC7Q", name: "Mvibez 4 You", )), - track_count: Some(33), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2742,7 +2742,7 @@ MusicGenre( id: "UCx_STF-ZTbFU7lqpcHwkb-A", name: "lea melissa engling", )), - track_count: Some(25), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2764,7 +2764,7 @@ MusicGenre( id: "UCTlmLGzTFM_Zvgn4At7FQsw", name: "Let,s Princesse Elisabeth Weißschwann", )), - track_count: Some(49), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2786,7 +2786,7 @@ MusicGenre( id: "UCRRYp0mnPuxUo2OuXBTPgIw", name: "MrSchindler5", )), - track_count: Some(50), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2808,7 +2808,7 @@ MusicGenre( id: "UCO-y9Zei-Hq57Fz-kJ5pFIg", name: "Team Adam!", )), - track_count: Some(24), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2830,7 +2830,7 @@ MusicGenre( id: "UCUt6RB8qCm_B7lkjC_uI_tg", name: "Dzauki Iskandar Syafrudin", )), - track_count: Some(80), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2852,7 +2852,7 @@ MusicGenre( id: "UCmv7JPapDD8EpFRZ3JPb6wA", name: "Bobbie Kook", )), - track_count: Some(93), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2874,7 +2874,7 @@ MusicGenre( id: "UC6VhkMQe9xPwmtTid1okEYA", name: "Southern Tasmania Inline Hockey", )), - track_count: Some(73), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2896,7 +2896,7 @@ MusicGenre( id: "UCheVMLm22cdOuin7FRfotpw", name: "Annette Morgan", )), - track_count: Some(30), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2918,7 +2918,7 @@ MusicGenre( id: "UCM95yzvaCbNYyd0wSlLivLA", name: "maddie kreuer", )), - track_count: Some(24), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2940,7 +2940,7 @@ MusicGenre( id: "UCZdhvY3ZRhLPzk63jfBu-Jg", name: "Christian Porras", )), - track_count: Some(51), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2962,7 +2962,7 @@ MusicGenre( id: "UCvHv1I-lzMi3yaIaVt9O6Cw", name: "Joe", )), - track_count: Some(23), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -2984,7 +2984,7 @@ MusicGenre( id: "UCBXE2_Z_79PCbMqYW7lM0Qw", name: "Lachlan Chan", )), - track_count: Some(73), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3006,7 +3006,7 @@ MusicGenre( id: "UC7Kjn0QXABRhGMNf8jplrYw", name: "Omer", )), - track_count: Some(60), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3028,7 +3028,7 @@ MusicGenre( id: "UCPvUeP07iI1Ump_E9Re9RoQ", name: "Rene LeClerc", )), - track_count: Some(42), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3050,7 +3050,7 @@ MusicGenre( id: "UCPLqqUd3JIUhKrQSWmX9xEA", name: "Rosie Bell", )), - track_count: Some(39), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3072,7 +3072,7 @@ MusicGenre( id: "UCTvzaZ5awMsP7sBc2QqgNpQ", name: "Jerah Korol", )), - track_count: Some(26), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3094,7 +3094,7 @@ MusicGenre( id: "UCeNpX2m43BU8qcsklSgx_fw", name: "Catherine Sauvé", )), - track_count: Some(20), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3116,7 +3116,7 @@ MusicGenre( id: "UC2AyRL_65MQLfAEslK2Tl1g", name: "DARK KNIGHT", )), - track_count: Some(78), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3138,7 +3138,7 @@ MusicGenre( id: "UC8kup9N401zYicNfFkPv2JA", name: "Daniel Benk", )), - track_count: Some(63), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3160,7 +3160,7 @@ MusicGenre( id: "UCaqUlqhB5V7TOm5fj53oGOA", name: "Fuxxy", )), - track_count: Some(50), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3182,7 +3182,7 @@ MusicGenre( id: "UCmy8DKpss3mIp3kPk3F9UTA", name: "Tony Smith", )), - track_count: Some(32), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3204,7 +3204,7 @@ MusicGenre( id: "UCkiXKygjWrLBRWO97DNOZoQ", name: "Ruben Aboy", )), - track_count: Some(72), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3226,7 +3226,7 @@ MusicGenre( id: "UCdYec8qochRRj9YIIeT3jww", name: "Liseth Guevara Báez", )), - track_count: Some(90), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3248,7 +3248,7 @@ MusicGenre( id: "UCckUkL5J6KtIfZ4-25SWtOg", name: "Paulo T. Pontes", )), - track_count: Some(33), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3270,7 +3270,7 @@ MusicGenre( id: "UCYGmCXupuYMcuMiaeHbiY0w", name: "Kian Tajada", )), - track_count: Some(30), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3292,7 +3292,7 @@ MusicGenre( id: "UCOV65XRJchWaXJyFdgb2lzA", name: "Damita Lindholm", )), - track_count: Some(34), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3314,7 +3314,7 @@ MusicGenre( id: "UCbm8JhtvCfxG6hw5GEKBpmA", name: "Paul Turcotte", )), - track_count: Some(37), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3336,7 +3336,7 @@ MusicGenre( id: "UC9Hjs1_UY3pCPGe3yuEsx6w", name: "Miguel Andrade", )), - track_count: Some(99), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3358,7 +3358,7 @@ MusicGenre( id: "UCTVj_-VIXzIH30yuniSmDSQ", name: "Roman Oberle", )), - track_count: Some(32), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3380,7 +3380,7 @@ MusicGenre( id: "UCimMbWRjsVfXHzna9akMntg", name: "Reppin Channel", )), - track_count: Some(20), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3402,7 +3402,7 @@ MusicGenre( id: "UCxWzBcFDA-Aefb5yHmkN-_w", name: "William Dyer", )), - track_count: Some(39), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3424,7 +3424,7 @@ MusicGenre( id: "UC39OAzxmN3aKTTUyBaWNxzg", name: "Floris Voges", )), - track_count: Some(31), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3446,7 +3446,7 @@ MusicGenre( id: "UC5OzEKzfcd54fr9JZCOz0_g", name: "Eric Wu", )), - track_count: Some(53), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3468,7 +3468,7 @@ MusicGenre( id: "UCNAcaEgjx4_hHS2v_GCbR2Q", name: "Marília Pereira", )), - track_count: Some(50), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3490,7 +3490,7 @@ MusicGenre( id: "UCpF2df_OmrVwsA7n2Luaxeg", name: "Marco Poinegger", )), - track_count: Some(22), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3512,7 +3512,7 @@ MusicGenre( id: "UCGWZDIUKZ60pcGr2YpB1uDg", name: "Heather Marie Woods", )), - track_count: Some(42), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3534,7 +3534,7 @@ MusicGenre( id: "UCnQUwx7YN_sR4g3ZcaXNamA", name: "Ольга Довгаль", )), - track_count: Some(28), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3556,7 +3556,7 @@ MusicGenre( id: "UCl1_WAQVo4zXNofT2yn3_Vw", name: "Lydia Powers", )), - track_count: Some(27), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3578,7 +3578,7 @@ MusicGenre( id: "UCNDEOk_usmdUC9hKvesMMsQ", name: "Somethinglol ehhhh", )), - track_count: Some(22), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3600,7 +3600,7 @@ MusicGenre( id: "UCb_WmI-Qasvilq2MtJVZCiQ", name: "Діма Зеленський", )), - track_count: Some(49), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3622,7 +3622,7 @@ MusicGenre( id: "UCNmm1P9aGwu-KgzbZoXn1yw", name: "Рина Мана", )), - track_count: Some(49), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3644,7 +3644,7 @@ MusicGenre( id: "UCr6d6Guxlal_cQew33oxwHg", name: "ells.xo.", )), - track_count: Some(46), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3666,7 +3666,7 @@ MusicGenre( id: "UCgGH1vmxGvwD5MJ_DnqWXdw", name: "Robb Rotundo", )), - track_count: Some(88), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -3688,7 +3688,7 @@ MusicGenre( id: "UCRWBNSG-WdBJW60ck1qNXSw", name: "Katelyn Powers", )), - track_count: Some(78), + track_count: None, from_ytm: false, ), ], diff --git a/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_artist.snap b/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_artist.snap index c06de8d..38b0155 100644 --- a/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_artist.snap +++ b/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_artist.snap @@ -507,7 +507,7 @@ MusicSearchResult( id: "UC0tDRlJxvcgAhXiHwZm4wcQ", name: "Elyssa Hamilton", )), - track_count: Some(155), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -534,7 +534,7 @@ MusicSearchResult( id: "UCNpa7-_q_H17TGFfUccs6mw", name: "Spencer Ramirez Salas", )), - track_count: Some(43), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -561,7 +561,7 @@ MusicSearchResult( id: "UCrESzB-SUekVTY3QI3Jfqlg", name: "N.J. Music", )), - track_count: Some(96), + track_count: None, from_ytm: false, ), ], diff --git a/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_default.snap b/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_default.snap index 879916d..f545e67 100644 --- a/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_default.snap +++ b/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_default.snap @@ -389,7 +389,7 @@ MusicSearchResult( id: "UCtZaFx5MXZHIh7VTItJK1lQ", name: "Lajos Fülöp", )), - track_count: Some(29), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -416,7 +416,7 @@ MusicSearchResult( id: "UCwFT0vvkbtbohtzVbwx7WjQ", name: "Toshihiko KOMINAMI", )), - track_count: Some(6), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -443,7 +443,7 @@ MusicSearchResult( id: "UCEdZAdnnKqbaHOlv8nM6OtA", name: "aespa", )), - track_count: Some(39), + track_count: None, from_ytm: false, ), ], diff --git a/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_radio.snap b/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_radio.snap index 60df461..9b6a9a2 100644 --- a/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_radio.snap +++ b/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_radio.snap @@ -438,7 +438,7 @@ MusicSearchResult( id: "UCEYgc2eKzQXQ9OGCuT4JVPQ", name: "Redlist - International Playlists", )), - track_count: Some(100), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -465,7 +465,7 @@ MusicSearchResult( id: "UCjD0UddJFWadpaTrBJPOVGw", name: "Raphaël Weissreiner", )), - track_count: Some(176), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -492,7 +492,7 @@ MusicSearchResult( id: "UCesP91XKnuZVd6OJN06hokg", name: "Startup Records", )), - track_count: Some(171), + track_count: None, from_ytm: false, ), ], diff --git a/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_typo.snap b/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_typo.snap index 7c02055..9e43c4d 100644 --- a/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_typo.snap +++ b/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_main_typo.snap @@ -397,7 +397,7 @@ MusicSearchResult( id: "UC2iUWrsf_RJIskqCZZHz4tg", name: "Saskia Wehmeyer", )), - track_count: Some(16), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -424,7 +424,7 @@ MusicSearchResult( id: "UCSj8sEcs5CEUmeIZMSPB7Ew", name: "Daniel Switali", )), - track_count: Some(16), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -451,7 +451,7 @@ MusicSearchResult( id: "UCs2uL32TTzWX0oVoblPF1nQ", name: "Nicole Kr", )), - track_count: Some(6), + track_count: None, from_ytm: false, ), ], diff --git a/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_playlists_community.snap b/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_playlists_community.snap index f3381e8..aeccc82 100644 --- a/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_playlists_community.snap +++ b/src/client/snapshots/rustypipe__client__music_search__tests__map_music_search_playlists_community.snap @@ -30,7 +30,7 @@ MusicSearchFiltered( id: "UCX9oPuvJYZsG8wnHTwOBVPA", name: "Chillax", )), - track_count: Some(220), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -57,7 +57,7 @@ MusicSearchFiltered( id: "UC8Ojfs-1VLiAO_MosLwvjpQ", name: "Redlist - Ultimate Music", )), - track_count: Some(70), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -84,7 +84,7 @@ MusicSearchFiltered( id: "UCE2DEoWWdlUlZsOpolWOgog", name: "Jeff Co", )), - track_count: Some(321), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -111,7 +111,7 @@ MusicSearchFiltered( id: "UCf7eNY2yY-cRuYshHmg4IIg", name: "Frank Denker", )), - track_count: Some(106), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -138,7 +138,7 @@ MusicSearchFiltered( id: "UCs72iRpTEuwV3y6pdWYLgiw", name: "Redlist - Just Hits", )), - track_count: Some(204), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -165,7 +165,7 @@ MusicSearchFiltered( id: "UCesP91XKnuZVd6OJN06hokg", name: "Startup Records", )), - track_count: Some(164), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -192,7 +192,7 @@ MusicSearchFiltered( id: "UCHuFqDbnqNhBsZB3KBj_Y0g", name: "Redlist - Músicas Internacionais", )), - track_count: Some(102), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -219,7 +219,7 @@ MusicSearchFiltered( id: "UCv9O2E_G8U46Paz8828THJw", name: "Victor Vaz", )), - track_count: Some(50), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -246,7 +246,7 @@ MusicSearchFiltered( id: "UCkX96b0MIXbisaGNCYXSRCQ", name: "Redlist - Music Tops", )), - track_count: Some(50), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -273,7 +273,7 @@ MusicSearchFiltered( id: "UCRnu4ZIsaCCDOJdFKIJgirw", name: "Redlist - Fresh Hits", )), - track_count: Some(100), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -300,7 +300,7 @@ MusicSearchFiltered( id: "UCs72iRpTEuwV3y6pdWYLgiw", name: "Redlist - Just Hits", )), - track_count: Some(180), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -327,7 +327,7 @@ MusicSearchFiltered( id: "UCGUHgJb6ZaJoOqQ6FHgV6zw", name: "Redlist - World Songs", )), - track_count: Some(91), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -354,7 +354,7 @@ MusicSearchFiltered( id: "UCPVhZsC2od1xjGhgEc2NEPQ", name: "Vevo Playlists", )), - track_count: Some(82), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -381,7 +381,7 @@ MusicSearchFiltered( id: "UCNAPgBbQ2iXE94osjz3-m_A", name: "Redlist - Top Hits", )), - track_count: Some(42), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -408,7 +408,7 @@ MusicSearchFiltered( id: "UCs72iRpTEuwV3y6pdWYLgiw", name: "Redlist - Just Hits", )), - track_count: Some(254), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -435,7 +435,7 @@ MusicSearchFiltered( id: "UC1crMgATGeegnQTZTImZuqA", name: "AXEG UK", )), - track_count: Some(236), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -462,7 +462,7 @@ MusicSearchFiltered( id: "UCSjPP6ccJ3MbsK7v-NfhFtw", name: "Redlist Grama", )), - track_count: Some(150), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -489,7 +489,7 @@ MusicSearchFiltered( id: "UCdeukGMkFDh8Zs662Z-d2pA", name: "Redlist - Melhores Músicas", )), - track_count: Some(101), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -516,7 +516,7 @@ MusicSearchFiltered( id: "UCPVhZsC2od1xjGhgEc2NEPQ", name: "Vevo Playlists", )), - track_count: Some(261), + track_count: None, from_ytm: false, ), MusicPlaylistItem( @@ -543,7 +543,7 @@ MusicSearchFiltered( id: "UCPVhZsC2od1xjGhgEc2NEPQ", name: "Vevo Playlists", )), - track_count: Some(52), + track_count: None, from_ytm: false, ), ], diff --git a/src/client/snapshots/rustypipe__client__pagination__tests__map_playlist_related.snap b/src/client/snapshots/rustypipe__client__pagination__tests__map_playlist_related.snap index b2b5175..e90c1c3 100644 --- a/src/client/snapshots/rustypipe__client__pagination__tests__map_playlist_related.snap +++ b/src/client/snapshots/rustypipe__client__pagination__tests__map_playlist_related.snap @@ -157,7 +157,7 @@ Paginator( id: "UCnOnrhWLv3YMoTVWqF4k82w", name: "botevpd", )), - track_count: Some(49), + track_count: None, from_ytm: false, ), MusicPlaylistItem( diff --git a/src/util/dictionary.rs b/src/util/dictionary.rs index e0049a8..d708915 100644 --- a/src/util/dictionary.rs +++ b/src/util/dictionary.rs @@ -2827,11 +2827,12 @@ pub(crate) fn entry(lang: Language) -> Entry { ], }, number_nd_tokens: ::phf::Map { - key: 10121458955350035957, + key: 7485420634051515786, disps: &[ - (1, 0), + (2, 0), ], entries: &[ + ("eitt", 1), ("ekkert", 0), ("einn", 1), ], @@ -4613,23 +4614,25 @@ pub(crate) fn entry(lang: Language) -> Entry { months: ::phf::Map { key: 15467950696543387533, disps: &[ - (0, 6), - (9, 10), + (4, 10), + (9, 6), (0, 0), ], entries: &[ - ("aug.", 8), - ("jan.", 1), - ("des.", 12), + ("okt.", 10), ("mar.", 3), - ("jun.", 6), - ("jul.", 7), - ("feb.", 2), + ("juli", 7), + ("nov.", 11), + ("des.", 12), ("apr.", 4), ("mai", 5), - ("nov.", 11), - ("okt.", 10), + ("juni", 6), + ("feb.", 2), ("sep.", 9), + ("aug.", 8), + ("jan.", 1), + ("jun.", 6), + ("jul.", 7), ], }, timeago_nd_tokens: ::phf::Map { diff --git a/src/util/timeago.rs b/src/util/timeago.rs index f5c368e..9c2931d 100644 --- a/src/util/timeago.rs +++ b/src/util/timeago.rs @@ -350,7 +350,7 @@ fn split_duration_txt(txt: &str, start_c: bool) -> Vec { let mut state: u8 = 0; let mut seg = DurationTxtSegment::default(); - for c in txt.chars() { + for c in txt.trim().chars() { if c.is_ascii_digit() { if state == 2 && (!seg.digits.is_empty() || (!start_c && segments.is_empty())) { segments.push(seg); @@ -363,7 +363,7 @@ fn split_duration_txt(txt: &str, start_c: bool) -> Vec { segments.push(seg); seg = DurationTxtSegment::default(); } - if c != ',' { + if !matches!(c, '.' | ',') { c.to_lowercase().for_each(|c| seg.word.push(c)); } state = 2; diff --git a/testfiles/dict/dictionary.json b/testfiles/dict/dictionary.json index 1f62381..6bca334 100644 --- a/testfiles/dict/dictionary.json +++ b/testfiles/dict/dictionary.json @@ -1621,6 +1621,7 @@ }, "number_nd_tokens": { "einn": 1, + "eitt": 1, "ekkert": 0 }, "album_types": { @@ -2646,7 +2647,9 @@ "feb.": 2, "jan.": 1, "jul.": 7, + "juli": 7, "jun.": 6, + "juni": 6, "mai": 5, "mar.": 3, "nov.": 11, diff --git a/testfiles/dict/large_number_samples.json b/testfiles/dict/large_number_samples.json index 82109d1..4417b6d 100644 --- a/testfiles/dict/large_number_samples.json +++ b/testfiles/dict/large_number_samples.json @@ -13500,7 +13500,8 @@ "99 þ. áhorf": 99029, "9 þ. áhorf": 9087, "Einn áskrifandi": 1, - "Ekkert áhorf enn": 0 + "Ekkert áhorf enn": 0, + "Eitt vídeó": 1 }, "it": { "1 iscritto": 1, diff --git a/testfiles/dict/playlist_samples.json b/testfiles/dict/playlist_samples.json index 0dd4ef6..4c510c9 100644 --- a/testfiles/dict/playlist_samples.json +++ b/testfiles/dict/playlist_samples.json @@ -943,8 +943,8 @@ "Mar": "Sist oppdatert 9. mar. 2015", "Apr": "Sist oppdatert 2. apr. 2017", "May": "Sist oppdatert 22. mai 2014", - "Jun": "Sist oppdatert 28. jun. 2014", - "Jul": "Sist oppdatert 2. jul. 2014", + "Jun": "Sist oppdatert 28. juni 2014", + "Jul": "Sist oppdatert 2. juli 2014", "Aug": "Sist oppdatert 23. aug. 2015", "Sep": "Sist oppdatert 16. sep. 2018", "Oct": "Sist oppdatert 31. okt. 2014", diff --git a/tests/youtube.rs b/tests/youtube.rs index 5efdacf..efb3532 100644 --- a/tests/youtube.rs +++ b/tests/youtube.rs @@ -796,6 +796,7 @@ fn channel_videos(rp: RustyPipe) { fn channel_shorts(rp: RustyPipe) { let channel = tokio_test::block_on( rp.query() + .lang(Language::Sq) .channel_videos_tab("UCh8gHdtzO2tXd593_bjErWg", ChannelVideoTab::Shorts), ) .unwrap(); @@ -1005,7 +1006,7 @@ fn channel_order( } } } - assert_next(latest, rp.query(), 15, 2); + assert_next(latest, rp.query(), 15, 1); let popular = tokio_test::block_on(rp.query().channel_videos_tab_order( id, @@ -1030,7 +1031,7 @@ fn channel_order( ); } } - assert_next(popular, rp.query(), 15, 2); + assert_next(popular, rp.query(), 15, 1); } #[rstest] @@ -1156,7 +1157,7 @@ fn search_filter_item_type(#[case] item_type: search_filter::ItemType, rp: Rusty fn search_empty(rp: RustyPipe) { let result = tokio_test::block_on( rp.query().search_filter( - "test", + "3gig84hgi34gu8vj34gj489", &search_filter::SearchFilter::new() .feature(search_filter::Feature::IsLive) .feature(search_filter::Feature::Is3d), @@ -1171,7 +1172,7 @@ fn search_empty(rp: RustyPipe) { fn search_suggestion(rp: RustyPipe) { let result = tokio_test::block_on(rp.query().search_suggestion("hunger ga")).unwrap(); - assert!(result.iter().any(|s| s.starts_with("hunger games "))); + assert!(result.iter().any(|s| s.starts_with("hunger games"))); assert_gte(result.len(), 10, "search suggestions"); } @@ -1373,7 +1374,7 @@ fn music_playlist_not_found(rp: RustyPipe) { #[case::various_artists("various_artists", "MPREb_8QkDeEIawvX")] #[case::single("single", "MPREb_bHfHGoy7vuv")] #[case::ep("ep", "MPREb_u1I69lSAe5v")] -#[case::audiobook("audiobook", "MPREb_gaoNzsQHedo")] +// #[case::audiobook("audiobook", "MPREb_gaoNzsQHedo")] #[case::show("show", "MPREb_cwzk8EUwypZ")] #[case::unavailable("unavailable", "MPREb_AzuWg8qAVVl")] #[case::no_year("no_year", "MPREb_F3Af9UZZVxX")] @@ -1835,7 +1836,6 @@ fn music_search_playlists_community(rp: RustyPipe) { "Best Pop Music Videos - Top Pop Hits Playlist" ); assert!(!playlist.thumbnail.is_empty(), "got no thumbnail"); - assert_gte(playlist.track_count.unwrap(), 250, "tracks"); let channel = playlist.channel.as_ref().unwrap(); assert_eq!(channel.id, "UCs72iRpTEuwV3y6pdWYLgiw"); @@ -2019,8 +2019,6 @@ fn music_related(#[case] id: &str, #[case] full: bool, rp: RustyPipe) { let channel = playlist.channel.unwrap(); assert_channel_id(&channel.id); assert!(!channel.name.is_empty()); - - assert_gte(playlist.track_count.unwrap(), 2, "tracks"); } else { assert!(playlist.channel.is_none()); } @@ -2216,8 +2214,6 @@ fn music_genre(#[case] id: &str, #[case] name: &str, rp: RustyPipe, unlocalized: let channel = playlist.channel.as_ref().unwrap(); assert_channel_id(&channel.id); assert!(!channel.name.is_empty()); - - assert_gte(playlist.track_count.unwrap(), 1, "tracks"); } else { assert!(playlist.channel.is_none()); }