fix: a/b test 8: parsing view count for tracks

This commit is contained in:
ThetaDev 2023-08-23 11:28:00 +02:00
parent 93e5ad22e9
commit 22e298ff98
33 changed files with 389 additions and 260 deletions

View file

@ -19,7 +19,7 @@ SAttributed {
text: "aespa 에스파 'Black ...",
video_id: "Ky5RT5oGg0w",
start_time: 0,
is_video: true,
vtype: Video,
},
Text {
text: "\n\n🎟\u{fe0f} aespa Showcase SYNK in LA! Tickets now on sale: ",

View file

@ -94,8 +94,7 @@ pub(crate) enum TextComponent {
text: String,
video_id: String,
start_time: u32,
/// True if the item is a video, false if it is a YTM track
is_video: bool,
vtype: MusicVideoType,
},
Browse {
text: String,
@ -167,11 +166,10 @@ fn map_text_component(text: String, nav: Option<NavigationEndpoint>) -> TextComp
text,
video_id: watch_endpoint.video_id,
start_time: watch_endpoint.start_time_seconds,
is_video: watch_endpoint
vtype: watch_endpoint
.watch_endpoint_music_supported_configs
.watch_endpoint_music_config
.music_video_type
== MusicVideoType::Video,
.music_video_type,
},
Some(NavigationEndpoint::Browse {
browse_endpoint,
@ -612,7 +610,7 @@ mod tests {
text: "DEEP",
video_id: "wZIoIgz5mbs",
start_time: 0,
is_video: true,
vtype: Video,
},
}
"###);