diff --git a/Justfile b/Justfile index 7d48e2b..72d9880 100644 --- a/Justfile +++ b/Justfile @@ -1,14 +1,15 @@ test: - cargo test --features=rss + # cargo test --features=rss + cargo nextest run --features=rss --no-fail-fast --failure-output final unittest: - cargo test --features=rss --lib + cargo nextest run --features=rss --no-fail-fast --failure-output final --lib testyt: - cargo test --features=rss --test youtube + cargo nextest run --features=rss --no-fail-fast --failure-output final --test youtube testyt-localized: - YT_LANG=th cargo test --features=rss --test youtube + YT_LANG=th cargo nextest run --features=rss --no-fail-fast --failure-output final --test youtube testintl: #!/usr/bin/env bash diff --git a/tests/snapshots/youtube__music_album_no_artist.snap b/tests/snapshots/youtube__music_album_no_artist.snap index 1b4773b..11818a7 100644 --- a/tests/snapshots/youtube__music_album_no_artist.snap +++ b/tests/snapshots/youtube__music_album_no_artist.snap @@ -3,32 +3,36 @@ source: tests/youtube.rs expression: album --- MusicAlbum( - id: "MPREb_bqWA6mAZFWS", - playlist_id: Some("OLAK5uy_mUiRbMqeQXFUH6h9KB87RcEmNtm45Qvs0"), - name: "Pedha Rasi Peddamma Katha", + id: "MPREb_Z81wHtF9fhC", + playlist_id: Some("OLAK5uy_l4sJyKllp77ht_HPYCUFo-sA6N8fNFNsY"), + name: "June Compilation", cover: "[cover]", artists: [], artist_id: None, description: None, - album_type: Ep, - year: Some(1968), - by_va: false, + album_type: Album, + year: Some(2024), + by_va: true, tracks: [ TrackItem( - id: "EX7-pOQHPyE", - name: "Siva Manoranjani", - duration: Some(267), + id: "ilNEztApdjI", + name: "Shanghai", + duration: Some(259), cover: [], artists: [ ArtistId( - id: Some("UC1C05NyYICFB2mVGn9_ttEw"), - name: "Dr. M. Balamuralikrishna", + id: Some("UC9MB9dkvCCpM3qVF71TZL7g"), + name: "Crubbixz", + ), + ArtistId( + id: Some("UCMYTb0sib5ppwQL9FAGmYTw"), + name: "Tank", ), ], - artist_id: Some("UC1C05NyYICFB2mVGn9_ttEw"), + artist_id: Some("UC9MB9dkvCCpM3qVF71TZL7g"), album: Some(AlbumId( - id: "MPREb_bqWA6mAZFWS", - name: "Pedha Rasi Peddamma Katha", + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", )), view_count: "[view_count]", is_video: false, @@ -36,20 +40,20 @@ MusicAlbum( by_va: false, ), TrackItem( - id: "0AyWB-Quj4A", - name: "Kuluku Nadakula", - duration: Some(179), + id: "s-qSnZyyvzs", + name: "Always Be With U(Extended Mix)", + duration: Some(165), cover: [], artists: [ ArtistId( - id: Some("UCDqpyYkgWy2h03HamIfODjw"), - name: "Ghantasala, Chorus", + id: Some("UCpAZ1Ap_nuAEk9RiT-nUsWQ"), + name: "陈海择HeizerChan", ), ], - artist_id: Some("UCDqpyYkgWy2h03HamIfODjw"), + artist_id: Some("UCpAZ1Ap_nuAEk9RiT-nUsWQ"), album: Some(AlbumId( - id: "MPREb_bqWA6mAZFWS", - name: "Pedha Rasi Peddamma Katha", + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", )), view_count: "[view_count]", is_video: false, @@ -57,20 +61,20 @@ MusicAlbum( by_va: false, ), TrackItem( - id: "s0Sb-GZLXSM", - name: "Gulabi Buggalunna", - duration: Some(155), + id: "4jXoRBcQ8PY", + name: "Elude (Extended Mix)", + duration: Some(329), cover: [], artists: [ ArtistId( - id: Some("UC_KQPMiRQl3CFAIKTVfCHwA"), - name: "L.r. Eswari", + id: None, + name: "Julius Beat & SinDj", ), ], - artist_id: Some("UC_KQPMiRQl3CFAIKTVfCHwA"), + artist_id: Some("UCCRiYE0dTFA_pc23-97GfSg"), album: Some(AlbumId( - id: "MPREb_bqWA6mAZFWS", - name: "Pedha Rasi Peddamma Katha", + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", )), view_count: "[view_count]", is_video: false, @@ -78,57 +82,252 @@ MusicAlbum( by_va: false, ), TrackItem( - id: "P4XAaXjlCDA", - name: "Oh Javaraala", - duration: Some(229), + id: "DRES9S4VQI8", + name: "Venus (Extended Mix)", + duration: Some(202), cover: [], artists: [ ArtistId( - id: Some("UCl4iPtukwe7m0kIxUMskkgA"), - name: "S.p. Balasubrahmanyam, S. Janaki", + id: Some("UC_y8p7fi6t3z10R2UEMQG_A"), + name: "Andymion", ), ], - artist_id: Some("UCl4iPtukwe7m0kIxUMskkgA"), + artist_id: Some("UC_y8p7fi6t3z10R2UEMQG_A"), album: Some(AlbumId( - id: "MPREb_bqWA6mAZFWS", - name: "Pedha Rasi Peddamma Katha", + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", )), view_count: "[view_count]", is_video: false, track_nr: Some(4), by_va: false, ), - ], - variants: [ - AlbumItem( - id: "MPREb_h8ltx5oKvyY", - name: "Pedha Rasi Peddamma Katha", - cover: [ - Thumbnail( - url: "https://lh3.googleusercontent.com/iZtBdPWBGNB-GAWvOp9seuYj5QqKrUYGSe-B5J026yxHqFSWv4zsxHy-LxX5LbFlnepOPRWNLrajO-_-=w226-h226-l90-rj", - width: 226, - height: 226, - ), - Thumbnail( - url: "https://lh3.googleusercontent.com/iZtBdPWBGNB-GAWvOp9seuYj5QqKrUYGSe-B5J026yxHqFSWv4zsxHy-LxX5LbFlnepOPRWNLrajO-_-=w544-h544-l90-rj", - width: 544, - height: 544, - ), - ], + TrackItem( + id: "yhZVimwD4B4", + name: "Arise", + duration: Some(213), + cover: [], artists: [ ArtistId( - id: Some("UCl4iPtukwe7m0kIxUMskkgA"), - name: "S P Balasubramaniam", + id: Some("UCYAzELapKjDUHMGRbzjJtgw"), + name: "Takahiro Yoshihira", ), ArtistId( - id: Some("UCWgAqlYG7mXTUxrFiLyDSsg"), - name: "S Janaki", + id: Some("UCN2Ji-D6Tzn5CTC7iCWoX8w"), + name: "TOMI-NORI", ), ], - artist_id: Some("UCl4iPtukwe7m0kIxUMskkgA"), - album_type: Ep, - year: None, + artist_id: Some("UCYAzELapKjDUHMGRbzjJtgw"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(5), + by_va: false, + ), + TrackItem( + id: "5d6YiFkdzLM", + name: "Acid Rave (Extended Mix)", + duration: Some(191), + cover: [], + artists: [ + ArtistId( + id: Some("UCFqaoKXGfCsd9VRQNXzhIjQ"), + name: "SteelDrum", + ), + ], + artist_id: Some("UCFqaoKXGfCsd9VRQNXzhIjQ"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(6), + by_va: false, + ), + TrackItem( + id: "3Qe7-uN2PjU", + name: "Destiny (Extended Mix)", + duration: Some(446), + cover: [], + artists: [ + ArtistId( + id: Some("UCjqRwXhXgFW7RDDPn_TlAbw"), + name: "Tyranix", + ), + ArtistId( + id: Some("UCy69bQ95ovXIquWzY5jfAIA"), + name: "Jawzcirclesix", + ), + ], + artist_id: Some("UCjqRwXhXgFW7RDDPn_TlAbw"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(7), + by_va: false, + ), + TrackItem( + id: "SKZ_MTsXFP4", + name: "Darksiders (Extended Mix)", + duration: Some(376), + cover: [], + artists: [ + ArtistId( + id: Some("UCEUUFTUZpm1MmANCfLN5_9Q"), + name: "Kruky", + ), + ], + artist_id: Some("UCEUUFTUZpm1MmANCfLN5_9Q"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(8), + by_va: false, + ), + TrackItem( + id: "n5-ujUwazDA", + name: "Mind Game (Extended Mix)", + duration: Some(335), + cover: [], + artists: [ + ArtistId( + id: Some("UCxByvsK9hDZk2MnnF9jsFGw"), + name: "Herbrido", + ), + ], + artist_id: Some("UCxByvsK9hDZk2MnnF9jsFGw"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(9), + by_va: false, + ), + TrackItem( + id: "VaREivfDJeY", + name: "Caronte (Extended Mix)", + duration: Some(268), + cover: [], + artists: [ + ArtistId( + id: Some("UCG2o9g3Yl6jBL21_z7XBMVw"), + name: "Foodydrop", + ), + ], + artist_id: Some("UCG2o9g3Yl6jBL21_z7XBMVw"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(10), + by_va: false, + ), + TrackItem( + id: "cWcD0WIK2PA", + name: "Left Right Go (Extended Mix)", + duration: Some(198), + cover: [], + artists: [ + ArtistId( + id: Some("UCiIDz3M3cDn2QeYjLbhIdBQ"), + name: "Fly飞", + ), + ArtistId( + id: Some("UChLPGmjYa8bmKShqMBFP_DA"), + name: "MARSJONE 鸡万", + ), + ], + artist_id: Some("UCiIDz3M3cDn2QeYjLbhIdBQ"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(11), + by_va: false, + ), + TrackItem( + id: "QRELvH564T4", + name: "Terminal Zero (Extended Mix)", + duration: Some(325), + cover: [], + artists: [ + ArtistId( + id: Some("UCbiVmjdLA5PKZcUnZMExqCA"), + name: "Reivax", + ), + ], + artist_id: Some("UCbiVmjdLA5PKZcUnZMExqCA"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(12), + by_va: false, + ), + TrackItem( + id: "eCY0-GyG46s", + name: "The Unknown (Extended Mix)", + duration: Some(198), + cover: [], + artists: [ + ArtistId( + id: Some("UC-thVg_PSz894f5mVqMFMeQ"), + name: "Elia Akita", + ), + ], + artist_id: Some("UC-thVg_PSz894f5mVqMFMeQ"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(13), + by_va: false, + ), + TrackItem( + id: "UIrHYTEyUfA", + name: "This is Acid (Extended Mix)", + duration: Some(213), + cover: [], + artists: [ + ArtistId( + id: Some("UC2pJL-Kp6yJtARS8MC0N8Ag"), + name: "Monored", + ), + ArtistId( + id: Some("UCpmZakvqLLUZ4G_YkKjoy6g"), + name: "Egemen Kızıltekin", + ), + ], + artist_id: Some("UC2pJL-Kp6yJtARS8MC0N8Ag"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "June Compilation", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(14), by_va: false, ), ], + variants: [], ) diff --git a/tests/snapshots/youtube__music_album_no_artist_intl.snap b/tests/snapshots/youtube__music_album_no_artist_intl.snap index 779f0aa..4eb19bc 100644 --- a/tests/snapshots/youtube__music_album_no_artist_intl.snap +++ b/tests/snapshots/youtube__music_album_no_artist_intl.snap @@ -3,31 +3,35 @@ source: tests/youtube.rs expression: album --- MusicAlbum( - id: "MPREb_bqWA6mAZFWS", - playlist_id: Some("OLAK5uy_mUiRbMqeQXFUH6h9KB87RcEmNtm45Qvs0"), + id: "MPREb_Z81wHtF9fhC", + playlist_id: Some("OLAK5uy_l4sJyKllp77ht_HPYCUFo-sA6N8fNFNsY"), name: "[name]", cover: "[cover]", artists: [], artist_id: None, description: "[description]", - album_type: Ep, - year: Some(1968), - by_va: false, + album_type: Album, + year: Some(2024), + by_va: true, tracks: [ TrackItem( - id: "EX7-pOQHPyE", + id: "ilNEztApdjI", name: "[name]", - duration: Some(267), + duration: Some(259), cover: [], artists: [ ArtistId( - id: Some("UC1C05NyYICFB2mVGn9_ttEw"), + id: Some("UC9MB9dkvCCpM3qVF71TZL7g"), + name: "[name]", + ), + ArtistId( + id: Some("UCMYTb0sib5ppwQL9FAGmYTw"), name: "[name]", ), ], - artist_id: Some("UC1C05NyYICFB2mVGn9_ttEw"), + artist_id: Some("UC9MB9dkvCCpM3qVF71TZL7g"), album: Some(AlbumId( - id: "MPREb_bqWA6mAZFWS", + id: "MPREb_Z81wHtF9fhC", name: "[name]", )), view_count: "[view_count]", @@ -36,19 +40,19 @@ MusicAlbum( by_va: false, ), TrackItem( - id: "0AyWB-Quj4A", + id: "s-qSnZyyvzs", name: "[name]", - duration: Some(179), + duration: Some(165), cover: [], artists: [ ArtistId( - id: Some("UCDqpyYkgWy2h03HamIfODjw"), + id: Some("UCpAZ1Ap_nuAEk9RiT-nUsWQ"), name: "[name]", ), ], - artist_id: Some("UCDqpyYkgWy2h03HamIfODjw"), + artist_id: Some("UCpAZ1Ap_nuAEk9RiT-nUsWQ"), album: Some(AlbumId( - id: "MPREb_bqWA6mAZFWS", + id: "MPREb_Z81wHtF9fhC", name: "[name]", )), view_count: "[view_count]", @@ -57,19 +61,19 @@ MusicAlbum( by_va: false, ), TrackItem( - id: "s0Sb-GZLXSM", + id: "4jXoRBcQ8PY", name: "[name]", - duration: Some(155), + duration: Some(329), cover: [], artists: [ ArtistId( - id: Some("UC_KQPMiRQl3CFAIKTVfCHwA"), + id: None, name: "[name]", ), ], - artist_id: Some("UC_KQPMiRQl3CFAIKTVfCHwA"), + artist_id: Some("UCCRiYE0dTFA_pc23-97GfSg"), album: Some(AlbumId( - id: "MPREb_bqWA6mAZFWS", + id: "MPREb_Z81wHtF9fhC", name: "[name]", )), view_count: "[view_count]", @@ -78,19 +82,19 @@ MusicAlbum( by_va: false, ), TrackItem( - id: "P4XAaXjlCDA", + id: "DRES9S4VQI8", name: "[name]", - duration: Some(229), + duration: Some(202), cover: [], artists: [ ArtistId( - id: Some("UCl4iPtukwe7m0kIxUMskkgA"), + id: Some("UC_y8p7fi6t3z10R2UEMQG_A"), name: "[name]", ), ], - artist_id: Some("UCl4iPtukwe7m0kIxUMskkgA"), + artist_id: Some("UC_y8p7fi6t3z10R2UEMQG_A"), album: Some(AlbumId( - id: "MPREb_bqWA6mAZFWS", + id: "MPREb_Z81wHtF9fhC", name: "[name]", )), view_count: "[view_count]", @@ -98,37 +102,232 @@ MusicAlbum( track_nr: Some(4), by_va: false, ), - ], - variants: [ - AlbumItem( - id: "MPREb_h8ltx5oKvyY", - name: "Pedha Rasi Peddamma Katha", - cover: [ - Thumbnail( - url: "https://lh3.googleusercontent.com/iZtBdPWBGNB-GAWvOp9seuYj5QqKrUYGSe-B5J026yxHqFSWv4zsxHy-LxX5LbFlnepOPRWNLrajO-_-=w226-h226-l90-rj", - width: 226, - height: 226, - ), - Thumbnail( - url: "https://lh3.googleusercontent.com/iZtBdPWBGNB-GAWvOp9seuYj5QqKrUYGSe-B5J026yxHqFSWv4zsxHy-LxX5LbFlnepOPRWNLrajO-_-=w544-h544-l90-rj", - width: 544, - height: 544, - ), - ], + TrackItem( + id: "yhZVimwD4B4", + name: "[name]", + duration: Some(213), + cover: [], artists: [ ArtistId( - id: Some("UCl4iPtukwe7m0kIxUMskkgA"), + id: Some("UCYAzELapKjDUHMGRbzjJtgw"), name: "[name]", ), ArtistId( - id: Some("UCWgAqlYG7mXTUxrFiLyDSsg"), + id: Some("UCN2Ji-D6Tzn5CTC7iCWoX8w"), name: "[name]", ), ], - artist_id: Some("UCl4iPtukwe7m0kIxUMskkgA"), - album_type: Ep, - year: None, + artist_id: Some("UCYAzELapKjDUHMGRbzjJtgw"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "[name]", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(5), + by_va: false, + ), + TrackItem( + id: "5d6YiFkdzLM", + name: "[name]", + duration: Some(191), + cover: [], + artists: [ + ArtistId( + id: Some("UCFqaoKXGfCsd9VRQNXzhIjQ"), + name: "[name]", + ), + ], + artist_id: Some("UCFqaoKXGfCsd9VRQNXzhIjQ"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "[name]", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(6), + by_va: false, + ), + TrackItem( + id: "3Qe7-uN2PjU", + name: "[name]", + duration: Some(446), + cover: [], + artists: [ + ArtistId( + id: Some("UCjqRwXhXgFW7RDDPn_TlAbw"), + name: "[name]", + ), + ArtistId( + id: Some("UCy69bQ95ovXIquWzY5jfAIA"), + name: "[name]", + ), + ], + artist_id: Some("UCjqRwXhXgFW7RDDPn_TlAbw"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "[name]", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(7), + by_va: false, + ), + TrackItem( + id: "SKZ_MTsXFP4", + name: "[name]", + duration: Some(376), + cover: [], + artists: [ + ArtistId( + id: Some("UCEUUFTUZpm1MmANCfLN5_9Q"), + name: "[name]", + ), + ], + artist_id: Some("UCEUUFTUZpm1MmANCfLN5_9Q"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "[name]", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(8), + by_va: false, + ), + TrackItem( + id: "n5-ujUwazDA", + name: "[name]", + duration: Some(335), + cover: [], + artists: [ + ArtistId( + id: Some("UCxByvsK9hDZk2MnnF9jsFGw"), + name: "[name]", + ), + ], + artist_id: Some("UCxByvsK9hDZk2MnnF9jsFGw"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "[name]", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(9), + by_va: false, + ), + TrackItem( + id: "VaREivfDJeY", + name: "[name]", + duration: Some(268), + cover: [], + artists: [ + ArtistId( + id: Some("UCG2o9g3Yl6jBL21_z7XBMVw"), + name: "[name]", + ), + ], + artist_id: Some("UCG2o9g3Yl6jBL21_z7XBMVw"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "[name]", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(10), + by_va: false, + ), + TrackItem( + id: "cWcD0WIK2PA", + name: "[name]", + duration: Some(198), + cover: [], + artists: [ + ArtistId( + id: Some("UCiIDz3M3cDn2QeYjLbhIdBQ"), + name: "[name]", + ), + ArtistId( + id: Some("UChLPGmjYa8bmKShqMBFP_DA"), + name: "[name]", + ), + ], + artist_id: Some("UCiIDz3M3cDn2QeYjLbhIdBQ"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "[name]", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(11), + by_va: false, + ), + TrackItem( + id: "QRELvH564T4", + name: "[name]", + duration: Some(325), + cover: [], + artists: [ + ArtistId( + id: Some("UCbiVmjdLA5PKZcUnZMExqCA"), + name: "[name]", + ), + ], + artist_id: Some("UCbiVmjdLA5PKZcUnZMExqCA"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "[name]", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(12), + by_va: false, + ), + TrackItem( + id: "eCY0-GyG46s", + name: "[name]", + duration: Some(198), + cover: [], + artists: [ + ArtistId( + id: Some("UC-thVg_PSz894f5mVqMFMeQ"), + name: "[name]", + ), + ], + artist_id: Some("UC-thVg_PSz894f5mVqMFMeQ"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "[name]", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(13), + by_va: false, + ), + TrackItem( + id: "UIrHYTEyUfA", + name: "[name]", + duration: Some(213), + cover: [], + artists: [ + ArtistId( + id: Some("UC2pJL-Kp6yJtARS8MC0N8Ag"), + name: "[name]", + ), + ArtistId( + id: Some("UCpmZakvqLLUZ4G_YkKjoy6g"), + name: "[name]", + ), + ], + artist_id: Some("UC2pJL-Kp6yJtARS8MC0N8Ag"), + album: Some(AlbumId( + id: "MPREb_Z81wHtF9fhC", + name: "[name]", + )), + view_count: "[view_count]", + is_video: false, + track_nr: Some(14), by_va: false, ), ], + variants: [], ) diff --git a/tests/snapshots/youtube__music_album_version_no_artist.snap b/tests/snapshots/youtube__music_album_version_no_artist.snap deleted file mode 100644 index b7a3813..0000000 --- a/tests/snapshots/youtube__music_album_version_no_artist.snap +++ /dev/null @@ -1,138 +0,0 @@ ---- -source: tests/youtube.rs -expression: album ---- -MusicAlbum( - id: "MPREb_h8ltx5oKvyY", - playlist_id: Some("OLAK5uy_lIDfTi_k8V1RJ54MeJJGK_BduAeYbm-0s"), - name: "Pedha Rasi Peddamma Katha", - cover: "[cover]", - artists: [ - ArtistId( - id: Some("UCl4iPtukwe7m0kIxUMskkgA"), - name: "S P Balasubramaniam", - ), - ArtistId( - id: Some("UCWgAqlYG7mXTUxrFiLyDSsg"), - name: "S Janaki", - ), - ], - artist_id: Some("UCl4iPtukwe7m0kIxUMskkgA"), - description: None, - album_type: Ep, - year: Some(1968), - by_va: false, - tracks: [ - TrackItem( - id: "AKJ3IJZKPWc", - name: "Oh Javaraala", - duration: Some(229), - cover: [], - artists: [ - ArtistId( - id: Some("UCl4iPtukwe7m0kIxUMskkgA"), - name: "S P Balasubramaniam", - ), - ArtistId( - id: Some("UCWgAqlYG7mXTUxrFiLyDSsg"), - name: "S Janaki", - ), - ], - artist_id: Some("UCl4iPtukwe7m0kIxUMskkgA"), - album: Some(AlbumId( - id: "MPREb_h8ltx5oKvyY", - name: "Pedha Rasi Peddamma Katha", - )), - view_count: "[view_count]", - is_video: false, - track_nr: Some(1), - by_va: false, - ), - TrackItem( - id: "WnpZuHNB33E", - name: "Siva Manoranjani", - duration: Some(267), - cover: [], - artists: [ - ArtistId( - id: Some("UC1C05NyYICFB2mVGn9_ttEw"), - name: "M Balamuralikrishna", - ), - ], - artist_id: Some("UC1C05NyYICFB2mVGn9_ttEw"), - album: Some(AlbumId( - id: "MPREb_h8ltx5oKvyY", - name: "Pedha Rasi Peddamma Katha", - )), - view_count: "[view_count]", - is_video: false, - track_nr: Some(2), - by_va: false, - ), - TrackItem( - id: "pRqoDGXg1-I", - name: "Gulabi Buggalunna", - duration: Some(155), - cover: [], - artists: [ - ArtistId( - id: Some("UC_KQPMiRQl3CFAIKTVfCHwA"), - name: "L R Eswari", - ), - ], - artist_id: Some("UC_KQPMiRQl3CFAIKTVfCHwA"), - album: Some(AlbumId( - id: "MPREb_h8ltx5oKvyY", - name: "Pedha Rasi Peddamma Katha", - )), - view_count: "[view_count]", - is_video: false, - track_nr: Some(3), - by_va: false, - ), - TrackItem( - id: "20vIKLJxjBY", - name: "Kuluku Nadakula", - duration: Some(179), - cover: [], - artists: [ - ArtistId( - id: None, - name: "Ghantasala & Chorus", - ), - ], - artist_id: Some("UCDqpyYkgWy2h03HamIfODjw"), - album: Some(AlbumId( - id: "MPREb_h8ltx5oKvyY", - name: "Pedha Rasi Peddamma Katha", - )), - view_count: "[view_count]", - is_video: false, - track_nr: Some(4), - by_va: false, - ), - ], - variants: [ - AlbumItem( - id: "MPREb_bqWA6mAZFWS", - name: "Pedha Rasi Peddamma Katha", - cover: [ - Thumbnail( - url: "https://lh3.googleusercontent.com/cyKTDdyucqYv8xfv0t3Vs9CkhmvssXRKsGzlWN_DU6A9uapXvovV0Ys2fXc9-r7Jv7V4UB1OD48iYH5z=w226-h226-l90-rj", - width: 226, - height: 226, - ), - Thumbnail( - url: "https://lh3.googleusercontent.com/cyKTDdyucqYv8xfv0t3Vs9CkhmvssXRKsGzlWN_DU6A9uapXvovV0Ys2fXc9-r7Jv7V4UB1OD48iYH5z=w544-h544-l90-rj", - width: 544, - height: 544, - ), - ], - artists: [], - artist_id: None, - album_type: Ep, - year: None, - by_va: true, - ), - ], -) diff --git a/tests/snapshots/youtube__music_album_version_no_artist_intl.snap b/tests/snapshots/youtube__music_album_version_no_artist_intl.snap deleted file mode 100644 index 4cc82ef..0000000 --- a/tests/snapshots/youtube__music_album_version_no_artist_intl.snap +++ /dev/null @@ -1,138 +0,0 @@ ---- -source: tests/youtube.rs -expression: album ---- -MusicAlbum( - id: "MPREb_h8ltx5oKvyY", - playlist_id: Some("OLAK5uy_lIDfTi_k8V1RJ54MeJJGK_BduAeYbm-0s"), - name: "[name]", - cover: "[cover]", - artists: [ - ArtistId( - id: Some("UCl4iPtukwe7m0kIxUMskkgA"), - name: "[name]", - ), - ArtistId( - id: Some("UCWgAqlYG7mXTUxrFiLyDSsg"), - name: "[name]", - ), - ], - artist_id: Some("UCl4iPtukwe7m0kIxUMskkgA"), - description: "[description]", - album_type: Ep, - year: Some(1968), - by_va: false, - tracks: [ - TrackItem( - id: "AKJ3IJZKPWc", - name: "[name]", - duration: Some(229), - cover: [], - artists: [ - ArtistId( - id: Some("UCl4iPtukwe7m0kIxUMskkgA"), - name: "[name]", - ), - ArtistId( - id: Some("UCWgAqlYG7mXTUxrFiLyDSsg"), - name: "[name]", - ), - ], - artist_id: Some("UCl4iPtukwe7m0kIxUMskkgA"), - album: Some(AlbumId( - id: "MPREb_h8ltx5oKvyY", - name: "[name]", - )), - view_count: "[view_count]", - is_video: false, - track_nr: Some(1), - by_va: false, - ), - TrackItem( - id: "WnpZuHNB33E", - name: "[name]", - duration: Some(267), - cover: [], - artists: [ - ArtistId( - id: Some("UC1C05NyYICFB2mVGn9_ttEw"), - name: "[name]", - ), - ], - artist_id: Some("UC1C05NyYICFB2mVGn9_ttEw"), - album: Some(AlbumId( - id: "MPREb_h8ltx5oKvyY", - name: "[name]", - )), - view_count: "[view_count]", - is_video: false, - track_nr: Some(2), - by_va: false, - ), - TrackItem( - id: "pRqoDGXg1-I", - name: "[name]", - duration: Some(155), - cover: [], - artists: [ - ArtistId( - id: Some("UC_KQPMiRQl3CFAIKTVfCHwA"), - name: "[name]", - ), - ], - artist_id: Some("UC_KQPMiRQl3CFAIKTVfCHwA"), - album: Some(AlbumId( - id: "MPREb_h8ltx5oKvyY", - name: "[name]", - )), - view_count: "[view_count]", - is_video: false, - track_nr: Some(3), - by_va: false, - ), - TrackItem( - id: "20vIKLJxjBY", - name: "[name]", - duration: Some(179), - cover: [], - artists: [ - ArtistId( - id: None, - name: "[name]", - ), - ], - artist_id: Some("UCDqpyYkgWy2h03HamIfODjw"), - album: Some(AlbumId( - id: "MPREb_h8ltx5oKvyY", - name: "[name]", - )), - view_count: "[view_count]", - is_video: false, - track_nr: Some(4), - by_va: false, - ), - ], - variants: [ - AlbumItem( - id: "MPREb_bqWA6mAZFWS", - name: "Pedha Rasi Peddamma Katha", - cover: [ - Thumbnail( - url: "https://lh3.googleusercontent.com/cyKTDdyucqYv8xfv0t3Vs9CkhmvssXRKsGzlWN_DU6A9uapXvovV0Ys2fXc9-r7Jv7V4UB1OD48iYH5z=w226-h226-l90-rj", - width: 226, - height: 226, - ), - Thumbnail( - url: "https://lh3.googleusercontent.com/cyKTDdyucqYv8xfv0t3Vs9CkhmvssXRKsGzlWN_DU6A9uapXvovV0Ys2fXc9-r7Jv7V4UB1OD48iYH5z=w544-h544-l90-rj", - width: 544, - height: 544, - ), - ], - artists: [], - artist_id: None, - album_type: Ep, - year: None, - by_va: true, - ), - ], -) diff --git a/tests/snapshots/youtube__music_artist_only_singles.snap b/tests/snapshots/youtube__music_artist_only_singles.snap index 9e673ba..3531789 100644 --- a/tests/snapshots/youtube__music_artist_only_singles.snap +++ b/tests/snapshots/youtube__music_artist_only_singles.snap @@ -6,7 +6,7 @@ MusicArtist( id: "UCfwCE5VhPMGxNPFxtVv7lRw", name: "Sulli", header_image: "[header_image]", - description: Some("Choi Jin-ri, better known by her stage name Sulli, was a South Korean singer and actress. She first made her debut as a child actress, appearing as a supporting cast member on the SBS historical drama Ballad of Seodong. Following this, she earned a number of guest roles, appearing in the television series Love Needs a Miracle and Drama City, and the film Vacation. She then subsequently appeared in the independent films Punch Lady and BA:BO, the former being her first time cast in a substantial dramatic role.\nAfter signing a record deal with SM Entertainment, Sulli rose to prominence as a member of the girl group f(x) formed in 2009. The group achieved both critical and commercial success, with four Korean number-one singles and international recognition after becoming the first K-pop act to perform at SXSW. Concurrently with her music career, Sulli returned to acting by starring in the SBS romantic comedy series, To the Beautiful You, a Korean adaptation of the shōjo manga Hana-Kimi where her performance was positively received and earned her two SBS Drama Awards and a nomination at the 49th Paeksang Arts Awards.\n\nFrom Wikipedia (https://en.wikipedia.org/wiki/Sulli) under Creative Commons Attribution CC-BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/legalcode)"), + description: Some("Choi Jin-ri, known professionally as Sulli, was a South Korean singer and actress. She first made her debut as a child actress, appearing as a supporting cast member on the SBS historical drama Ballad of Seodong. Following this, she earned a number of guest roles, appearing in the television series Love Needs a Miracle and Drama City, and the film Vacation. She then subsequently appeared in the independent films Punch Lady and BA:BO, the former being her first time cast in a substantial dramatic role.\nAfter signing a record deal with SM Entertainment, Sulli rose to prominence as a member of the girl group f(x) formed in 2009. The group achieved both critical and commercial success, with four Korean number-one singles and international recognition after becoming the first K-pop act to perform at SXSW. Concurrently with her music career, Sulli returned to acting by starring in the SBS romantic comedy series, To the Beautiful You, a Korean adaptation of the shōjo manga Hana-Kimi where her performance was positively received and earned her two SBS Drama Awards and a nomination at the 49th Paeksang Arts Awards.\n\nFrom Wikipedia (https://en.wikipedia.org/wiki/Sulli) under Creative Commons Attribution CC-BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/legalcode)"), wikipedia_url: Some("https://en.wikipedia.org/wiki/Sulli"), subscriber_count: "[subscriber_count]", tracks: "[tracks]", diff --git a/tests/youtube.rs b/tests/youtube.rs index f748fb5..086dc52 100644 --- a/tests/youtube.rs +++ b/tests/youtube.rs @@ -67,8 +67,8 @@ async fn get_player_from_client(#[case] client_type: ClientType, rp: RustyPipe) let video = player_data .video_only_streams .into_iter() - .find(|s| s.itag == 247) - .expect("video #247"); + .find(|s| s.itag == 136) + .expect("video #136"); let audio = player_data .audio_streams .into_iter() @@ -76,17 +76,17 @@ async fn get_player_from_client(#[case] client_type: ClientType, rp: RustyPipe) .expect("audio #140"); // Bitrates may change between requests - assert_approx(video.bitrate, 1_500_162); - assert_eq!(video.average_bitrate, 1_360_266); - assert_eq!(video.size, Some(44_042_868)); + assert_approx(video.bitrate, 2_341_408); + assert_eq!(video.average_bitrate, 1_660_210); + assert_eq!(video.size, Some(53_754_490)); assert_eq!(video.width, 1280); assert_eq!(video.height, 720); assert_eq!(video.fps, 30); assert_eq!(video.quality, "720p"); assert!(!video.hdr); - assert_eq!(video.mime, "video/webm; codecs=\"vp09.00.31.08\""); - assert_eq!(video.format, VideoFormat::Webm); - assert_eq!(video.codec, VideoCodec::Vp9); + assert_eq!(video.mime, "video/mp4; codecs=\"avc1.4D401F\""); + assert_eq!(video.format, VideoFormat::Mp4); + assert_eq!(video.codec, VideoCodec::Avc1); assert_approx(audio.bitrate, 130_685); assert_approx(audio.average_bitrate, 129_496); @@ -1576,12 +1576,11 @@ async 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_aDDw2kVEFtM")] #[case::unavailable("unavailable", "MPREb_AzuWg8qAVVl")] #[case::no_year("no_year", "MPREb_F3Af9UZZVxX")] -#[case::version_no_artist("version_no_artist", "MPREb_h8ltx5oKvyY")] -#[case::no_artist("no_artist", "MPREb_bqWA6mAZFWS")] +#[case::no_artist("no_artist", "MPREb_Z81wHtF9fhC")] #[tokio::test] async fn music_album(#[case] name: &str, #[case] id: &str, rp: RustyPipe, unlocalized: bool) { let album = rp.query().music_album(id).await.unwrap();