refactor!: rename title field to name

This commit is contained in:
ThetaDev 2022-12-27 23:28:25 +01:00
parent 5188527b94
commit 1b94dc1f40
88 changed files with 2142 additions and 2142 deletions

File diff suppressed because it is too large Load diff

View file

@ -21,7 +21,7 @@ MusicAlbum(
tracks: [
TrackItem(
id: "aGd3VKSOTxY",
title: "Ich wache auf",
name: "Ich wache auf",
duration: Some(221),
cover: [],
artists: [
@ -42,7 +42,7 @@ MusicAlbum(
),
TrackItem(
id: "Jz-26iiDuYs",
title: "Waldbrand",
name: "Waldbrand",
duration: Some(208),
cover: [],
artists: [
@ -63,7 +63,7 @@ MusicAlbum(
),
TrackItem(
id: "Bu26uFtpt58",
title: "Verlernt",
name: "Verlernt",
duration: Some(223),
cover: [],
artists: [
@ -84,7 +84,7 @@ MusicAlbum(
),
TrackItem(
id: "RgwNqqiVqdY",
title: "In Farbe",
name: "In Farbe",
duration: Some(221),
cover: [],
artists: [
@ -105,7 +105,7 @@ MusicAlbum(
),
TrackItem(
id: "2TuOh30XbCI",
title: "Stadt im Hinterland",
name: "Stadt im Hinterland",
duration: Some(197),
cover: [],
artists: [

View file

@ -21,7 +21,7 @@ MusicAlbum(
tracks: [
TrackItem(
id: "g0iRiJ_ck48",
title: "Aulë und Yavanna",
name: "Aulë und Yavanna",
duration: Some(216),
cover: [],
artists: [
@ -42,7 +42,7 @@ MusicAlbum(
),
TrackItem(
id: "rREEBXp0y9s",
title: "Numenor",
name: "Numenor",
duration: Some(224),
cover: [],
artists: [
@ -63,7 +63,7 @@ MusicAlbum(
),
TrackItem(
id: "zvU5Y8Q19hU",
title: "Das Mädchen und die Liebe (feat. Santiano)",
name: "Das Mädchen und die Liebe (feat. Santiano)",
duration: Some(176),
cover: [],
artists: [
@ -84,7 +84,7 @@ MusicAlbum(
),
TrackItem(
id: "ARKLrzzTQA0",
title: "Niënna",
name: "Niënna",
duration: Some(215),
cover: [],
artists: [
@ -105,7 +105,7 @@ MusicAlbum(
),
TrackItem(
id: "tstLgN8A_Ng",
title: "Der fahle Mond",
name: "Der fahle Mond",
duration: Some(268),
cover: [],
artists: [
@ -126,7 +126,7 @@ MusicAlbum(
),
TrackItem(
id: "k2DjgQOY3Ts",
title: "Weise den Weg",
name: "Weise den Weg",
duration: Some(202),
cover: [],
artists: [
@ -147,7 +147,7 @@ MusicAlbum(
),
TrackItem(
id: "azHwhecxEsI",
title: "Zeit der Sommernächte",
name: "Zeit der Sommernächte",
duration: Some(185),
cover: [],
artists: [
@ -168,7 +168,7 @@ MusicAlbum(
),
TrackItem(
id: "_FcsdYIQ2co",
title: "Märchen enden gut",
name: "Märchen enden gut",
duration: Some(226),
cover: [],
artists: [
@ -189,7 +189,7 @@ MusicAlbum(
),
TrackItem(
id: "27bOWEbshyE",
title: "Das Mädchen und der Tod",
name: "Das Mädchen und der Tod",
duration: Some(207),
cover: [],
artists: [
@ -210,7 +210,7 @@ MusicAlbum(
),
TrackItem(
id: "riD_3oZwt8w",
title: "Wir sehn uns wieder",
name: "Wir sehn uns wieder",
duration: Some(211),
cover: [],
artists: [
@ -231,7 +231,7 @@ MusicAlbum(
),
TrackItem(
id: "8GNvjF3no9s",
title: "Tanz mit mir",
name: "Tanz mit mir",
duration: Some(179),
cover: [],
artists: [
@ -252,7 +252,7 @@ MusicAlbum(
),
TrackItem(
id: "YHMFzf1uN2U",
title: "Nachtigall",
name: "Nachtigall",
duration: Some(218),
cover: [],
artists: [
@ -273,7 +273,7 @@ MusicAlbum(
),
TrackItem(
id: "jvV-z5F3oAo",
title: "Gayatri Mantra",
name: "Gayatri Mantra",
duration: Some(277),
cover: [],
artists: [
@ -294,7 +294,7 @@ MusicAlbum(
),
TrackItem(
id: "u8_9cxlrh8k",
title: "Sing mir deine Lieder",
name: "Sing mir deine Lieder",
duration: Some(204),
cover: [],
artists: [
@ -315,7 +315,7 @@ MusicAlbum(
),
TrackItem(
id: "gSvKcvM1Wk0",
title: "Laurië lantar",
name: "Laurië lantar",
duration: Some(202),
cover: [],
artists: [
@ -336,7 +336,7 @@ MusicAlbum(
),
TrackItem(
id: "wQHgKRJ0pDQ",
title: "Wächter vor dem Tor",
name: "Wächter vor dem Tor",
duration: Some(222),
cover: [],
artists: [
@ -357,7 +357,7 @@ MusicAlbum(
),
TrackItem(
id: "Ckz5i6-hzf0",
title: "Stroh zu Gold",
name: "Stroh zu Gold",
duration: Some(177),
cover: [],
artists: [
@ -378,7 +378,7 @@ MusicAlbum(
),
TrackItem(
id: "y5zuUgyFqrc",
title: "Sonnenwendnacht",
name: "Sonnenwendnacht",
duration: Some(220),
cover: [],
artists: [

View file

@ -21,7 +21,7 @@ MusicAlbum(
tracks: [
TrackItem(
id: "lSbKz5LWvKE",
title: "Achtung, Waldbrand - Teil 1",
name: "Achtung, Waldbrand - Teil 1",
duration: Some(229),
cover: [],
artists: [
@ -42,7 +42,7 @@ MusicAlbum(
),
TrackItem(
id: "fdO6gu4qjRw",
title: "Achtung, Waldbrand - Teil 2",
name: "Achtung, Waldbrand - Teil 2",
duration: Some(235),
cover: [],
artists: [
@ -63,7 +63,7 @@ MusicAlbum(
),
TrackItem(
id: "muCxstXirvY",
title: "Achtung, Waldbrand - Teil 3",
name: "Achtung, Waldbrand - Teil 3",
duration: Some(197),
cover: [],
artists: [
@ -84,7 +84,7 @@ MusicAlbum(
),
TrackItem(
id: "aG1N0vo__Ng",
title: "Eiszeit - Teil 1",
name: "Eiszeit - Teil 1",
duration: Some(186),
cover: [],
artists: [
@ -105,7 +105,7 @@ MusicAlbum(
),
TrackItem(
id: "roHhLNYS9yo",
title: "Eiszeit - Teil 2",
name: "Eiszeit - Teil 2",
duration: Some(188),
cover: [],
artists: [
@ -126,7 +126,7 @@ MusicAlbum(
),
TrackItem(
id: "nJ49NuLvcAw",
title: "Eiszeit - Teil 3",
name: "Eiszeit - Teil 3",
duration: Some(205),
cover: [],
artists: [
@ -147,7 +147,7 @@ MusicAlbum(
),
TrackItem(
id: "Me119D570h0",
title: "Eiszeit - Teil 4",
name: "Eiszeit - Teil 4",
duration: Some(219),
cover: [],
artists: [
@ -168,7 +168,7 @@ MusicAlbum(
),
TrackItem(
id: "YXnRLK-qKG8",
title: "Im Sinkloch - Teil 1",
name: "Im Sinkloch - Teil 1",
duration: Some(240),
cover: [],
artists: [
@ -189,7 +189,7 @@ MusicAlbum(
),
TrackItem(
id: "A61wz1jz9X0",
title: "Im Sinkloch - Teil 2",
name: "Im Sinkloch - Teil 2",
duration: Some(239),
cover: [],
artists: [
@ -210,7 +210,7 @@ MusicAlbum(
),
TrackItem(
id: "u_S08EJOTUg",
title: "Im Sinkloch - Teil 3",
name: "Im Sinkloch - Teil 3",
duration: Some(197),
cover: [],
artists: [
@ -231,7 +231,7 @@ MusicAlbum(
),
TrackItem(
id: "0qwYJihV1EU",
title: "Vorsicht, heiß - Teil 1",
name: "Vorsicht, heiß - Teil 1",
duration: Some(201),
cover: [],
artists: [
@ -252,7 +252,7 @@ MusicAlbum(
),
TrackItem(
id: "zjhoyTnEzuQ",
title: "Vorsicht, heiß - Teil 2",
name: "Vorsicht, heiß - Teil 2",
duration: Some(187),
cover: [],
artists: [
@ -273,7 +273,7 @@ MusicAlbum(
),
TrackItem(
id: "oDjDd0UBzAY",
title: "Vorsicht, heiß - Teil 3",
name: "Vorsicht, heiß - Teil 3",
duration: Some(183),
cover: [],
artists: [
@ -294,7 +294,7 @@ MusicAlbum(
),
TrackItem(
id: "_3-WVmqgi-Q",
title: "Vorsicht, heiß - Teil 4",
name: "Vorsicht, heiß - Teil 4",
duration: Some(193),
cover: [],
artists: [

View file

@ -25,7 +25,7 @@ MusicAlbum(
tracks: [
TrackItem(
id: "VU6lEv0PKAo",
title: "Der Himmel reißt auf",
name: "Der Himmel reißt auf",
duration: Some(183),
cover: [],
artists: [

View file

@ -16,7 +16,7 @@ MusicAlbum(
tracks: [
TrackItem(
id: "R3VIKRtzAdE",
title: "Teeth",
name: "Teeth",
duration: Some(205),
cover: [],
artists: [
@ -37,7 +37,7 @@ MusicAlbum(
),
TrackItem(
id: "t0v0UOgOt18",
title: "Die A Little",
name: "Die A Little",
duration: Some(174),
cover: [],
artists: [
@ -58,7 +58,7 @@ MusicAlbum(
),
TrackItem(
id: "HjJYAkUXrxI",
title: "fuck, i\'m lonely (feat. Anne-Marie)",
name: "fuck, i\'m lonely (feat. Anne-Marie)",
duration: Some(199),
cover: [],
artists: [
@ -79,7 +79,7 @@ MusicAlbum(
),
TrackItem(
id: "Hg0KUOTL06I",
title: "Swim Home",
name: "Swim Home",
duration: Some(187),
cover: [],
artists: [
@ -100,7 +100,7 @@ MusicAlbum(
),
TrackItem(
id: "c8AfY6yhdkM",
title: "Another Summer Night Without You",
name: "Another Summer Night Without You",
duration: Some(159),
cover: [],
artists: [
@ -121,7 +121,7 @@ MusicAlbum(
),
TrackItem(
id: "_ZmdHjVvwhc",
title: "Miss U",
name: "Miss U",
duration: Some(186),
cover: [],
artists: [
@ -142,7 +142,7 @@ MusicAlbum(
),
TrackItem(
id: "wBe1Zi3q1n8",
title: "Favorite Drug",
name: "Favorite Drug",
duration: Some(209),
cover: [],
artists: [
@ -163,7 +163,7 @@ MusicAlbum(
),
TrackItem(
id: "l8Pj8s9uPGc",
title: "Keeping It In The Dark",
name: "Keeping It In The Dark",
duration: Some(209),
cover: [],
artists: [
@ -184,7 +184,7 @@ MusicAlbum(
),
TrackItem(
id: "Kn3cruxYj0c",
title: "All That (feat. Jeremih)",
name: "All That (feat. Jeremih)",
duration: Some(174),
cover: [],
artists: [
@ -205,7 +205,7 @@ MusicAlbum(
),
TrackItem(
id: "Sy1lIOl1YN0",
title: "This Baby Dont Cry",
name: "This Baby Dont Cry",
duration: Some(185),
cover: [],
artists: [
@ -226,7 +226,7 @@ MusicAlbum(
),
TrackItem(
id: "njdlNT1RRo4",
title: "Walk Forever By My Side",
name: "Walk Forever By My Side",
duration: Some(237),
cover: [],
artists: [
@ -247,7 +247,7 @@ MusicAlbum(
),
TrackItem(
id: "Si-CXM8CHqQ",
title: "Ordinary World (feat. White Sea)",
name: "Ordinary World (feat. White Sea)",
duration: Some(246),
cover: [],
artists: [

View file

@ -16,7 +16,7 @@ MusicAlbum(
tracks: [
TrackItem(
id: "Tzai7JXo45w",
title: "Waka Boom (My Way) (feat. Lee Young Ji)",
name: "Waka Boom (My Way) (feat. Lee Young Ji)",
duration: Some(274),
cover: [],
artists: [
@ -37,7 +37,7 @@ MusicAlbum(
),
TrackItem(
id: "9WYpLYAEub0",
title: "AURA",
name: "AURA",
duration: Some(216),
cover: [],
artists: [
@ -58,7 +58,7 @@ MusicAlbum(
),
TrackItem(
id: "R48tE237bW4",
title: "THE GIRLS (Cant turn me down)",
name: "THE GIRLS (Cant turn me down)",
duration: Some(239),
cover: [],
artists: [
@ -79,7 +79,7 @@ MusicAlbum(
),
TrackItem(
id: "-UzsoR6z-vg",
title: "Red Sun!",
name: "Red Sun!",
duration: Some(254),
cover: [],
artists: [
@ -100,7 +100,7 @@ MusicAlbum(
),
TrackItem(
id: "kbNVyn8Ex28",
title: "POSE",
name: "POSE",
duration: Some(187),
cover: [],
artists: [
@ -121,7 +121,7 @@ MusicAlbum(
),
TrackItem(
id: "NJrQZUzWP5Y",
title: "Whistle",
name: "Whistle",
duration: Some(224),
cover: [],
artists: [

View file

@ -5,7 +5,7 @@ expression: track
TrackDetails(
track: TrackItem(
id: "ZeerrnuLi5E",
title: "Black Mamba",
name: "Black Mamba",
duration: Some(230),
cover: "[cover]",
artists: [

View file

@ -5,7 +5,7 @@ expression: track
TrackDetails(
track: TrackItem(
id: "7nigXQS1Xb0",
title: "INVU",
name: "INVU",
duration: Some(205),
cover: "[cover]",
artists: [

View file

@ -40,7 +40,7 @@ async fn get_player_from_client(#[case] client_type: ClientType) {
// dbg!(&player_data);
assert_eq!(player_data.details.id, "n4tK7LYFxI0");
assert_eq!(player_data.details.title, "Spektrem - Shine [NCS Release]");
assert_eq!(player_data.details.name, "Spektrem - Shine [NCS Release]");
if client_type == ClientType::DesktopMusic {
assert!(player_data.details.description.is_none());
} else {
@ -217,7 +217,7 @@ async fn check_video_stream(s: impl YtStream) {
#[tokio::test]
async fn get_player(
#[case] id: &str,
#[case] title: &str,
#[case] name: &str,
#[case] description: &str,
#[case] length: u32,
#[case] channel_id: &str,
@ -231,7 +231,7 @@ async fn get_player(
let details = player_data.details;
assert_eq!(details.id, id);
assert_eq!(details.title, title);
assert_eq!(details.name, name);
let desc = details.description.unwrap();
assert!(desc.contains(description), "description: {}", desc);
assert_eq!(details.length, length);
@ -435,7 +435,7 @@ async fn get_video_details() {
// dbg!(&details);
assert_eq!(details.id, "ZeerrnuLi5E");
assert_eq!(details.title, "aespa 에스파 'Black Mamba' MV");
assert_eq!(details.name, "aespa 에스파 'Black Mamba' MV");
let desc = details.description.to_plaintext();
assert!(
desc.contains("Listen and download aespa's debut single \"Black Mamba\""),
@ -477,7 +477,7 @@ async fn get_video_details_music() {
// dbg!(&details);
assert_eq!(details.id, "XuM2onMGvTI");
assert_eq!(details.title, "Gäa");
assert_eq!(details.name, "Gäa");
let desc = details.description.to_plaintext();
assert!(desc.contains("Gäa · Oonagh"), "bad description: {}", desc);
@ -520,7 +520,7 @@ async fn get_video_details_ccommons() {
assert_eq!(details.id, "0rb9CfOvojk");
assert_eq!(
details.title,
details.name,
"BahnMining - Pünktlichkeit ist eine Zier (David Kriesel)"
);
let desc = details.description.to_plaintext();
@ -564,7 +564,7 @@ async fn get_video_details_chapters() {
// dbg!(&details);
assert_eq!(details.id, "nFDBxBUfE74");
assert_eq!(details.title, "The Prepper PC");
assert_eq!(details.name, "The Prepper PC");
let desc = details.description.to_plaintext();
assert!(
desc.contains("These days, you can game almost anywhere on the planet, anytime. But what if that planet was in the middle of an apocalypse"),
@ -600,72 +600,72 @@ async fn get_video_details_chapters() {
}, @r###"
[
Chapter(
title: "Intro",
name: "Intro",
position: 0,
thumbnail: "[ok]",
),
Chapter(
title: "The PC Built for Super Efficiency",
name: "The PC Built for Super Efficiency",
position: 42,
thumbnail: "[ok]",
),
Chapter(
title: "Our BURIAL ENCLOSURE?!",
name: "Our BURIAL ENCLOSURE?!",
position: 161,
thumbnail: "[ok]",
),
Chapter(
title: "Our Power Solution (Thanks Jackery!)",
name: "Our Power Solution (Thanks Jackery!)",
position: 211,
thumbnail: "[ok]",
),
Chapter(
title: "Diggin\' Holes",
name: "Diggin\' Holes",
position: 287,
thumbnail: "[ok]",
),
Chapter(
title: "Colonoscopy?",
name: "Colonoscopy?",
position: 330,
thumbnail: "[ok]",
),
Chapter(
title: "Diggin\' like a man",
name: "Diggin\' like a man",
position: 424,
thumbnail: "[ok]",
),
Chapter(
title: "The world\'s worst woodsman",
name: "The world\'s worst woodsman",
position: 509,
thumbnail: "[ok]",
),
Chapter(
title: "Backyard cable management",
name: "Backyard cable management",
position: 543,
thumbnail: "[ok]",
),
Chapter(
title: "Time to bury this boy",
name: "Time to bury this boy",
position: 602,
thumbnail: "[ok]",
),
Chapter(
title: "Solar Power Generation",
name: "Solar Power Generation",
position: 646,
thumbnail: "[ok]",
),
Chapter(
title: "Issues",
name: "Issues",
position: 697,
thumbnail: "[ok]",
),
Chapter(
title: "First Play Test",
name: "First Play Test",
position: 728,
thumbnail: "[ok]",
),
Chapter(
title: "Conclusion",
name: "Conclusion",
position: 800,
thumbnail: "[ok]",
),
@ -690,7 +690,7 @@ async fn get_video_details_live() {
assert_eq!(details.id, "86YLFOog4GM");
assert_eq!(
details.title,
details.name,
"🌎 Nasa Live Stream - Earth From Space : Live Views from the ISS"
);
let desc = details.description.to_plaintext();
@ -737,7 +737,7 @@ async fn get_video_details_agegate() {
assert_eq!(details.id, "HRKu0cvrr_o");
assert_eq!(
details.title,
details.name,
"AlphaOmegaSin Fanboy Logic: Likes/Dislikes Disabled = Point Invalid Lol wtf?"
);
insta::assert_ron_snapshot!(details.description, @"RichText([])");
@ -1516,7 +1516,7 @@ async fn music_search(#[case] typo: bool) {
let track = &res.tracks.iter().find(|a| a.id == "ZeerrnuLi5E").unwrap();
assert_eq!(track.title, "Black Mamba");
assert_eq!(track.name, "Black Mamba");
assert_eq!(track.duration.unwrap(), 230);
assert!(!track.cover.is_empty(), "got no cover");
@ -1545,7 +1545,7 @@ async fn music_search_tracks() {
.find(|a| a.id == "BL-aIpCLWnU")
.unwrap();
assert_eq!(track.title, "Black Mamba");
assert_eq!(track.name, "Black Mamba");
assert!(!track.cover.is_empty(), "got no cover");
assert!(!track.is_video);
assert_eq!(track.track_nr, None);
@ -1579,7 +1579,7 @@ async fn music_search_videos() {
.find(|a| a.id == "ZeerrnuLi5E")
.unwrap();
assert_eq!(track.title, "Black Mamba");
assert_eq!(track.name, "Black Mamba");
assert!(!track.cover.is_empty(), "got no cover");
assert!(track.is_video);
assert_eq!(track.track_nr, None);
@ -1618,7 +1618,7 @@ async fn music_search_episode() {
.unwrap();
assert_eq!(
track.title,
track.name,
"Blond - Da muss man dabei gewesen sein: Das Hörspiel - Fall #1"
);
assert!(!track.cover.is_empty(), "got no cover");
@ -1879,7 +1879,7 @@ async fn music_related(#[case] id: &str, #[case] full: bool) {
for track in related.tracks {
assert_video_id(&track.id);
assert!(!track.title.is_empty());
assert!(!track.name.is_empty());
assert!(!track.cover.is_empty(), "got no cover");
if let Some(artist_id) = track.artist_id {
@ -2086,7 +2086,7 @@ async fn music_new_videos() {
for video in videos {
assert_video_id(&video.id);
assert!(!video.title.is_empty());
assert!(!video.name.is_empty());
assert!(!video.cover.is_empty(), "got no cover");
assert_gte(video.view_count.unwrap(), 1000, "views");
assert!(video.is_video);