fix: add support for shorts playlists (A/B test 9)

This commit is contained in:
ThetaDev 2023-07-03 16:50:37 +02:00
parent 1bab2ef301
commit 031b730c47
5 changed files with 42 additions and 12 deletions

View file

@ -2241,14 +2241,10 @@ fn music_genre(#[case] id: &str, #[case] name: &str, rp: RustyPipe, unlocalized:
assert!(!playlist.thumbnail.is_empty(), "got no cover");
if !playlist.from_ytm {
assert!(
playlist.channel.is_some(),
"pl: {}, got no channel",
playlist.id
);
let channel = playlist.channel.as_ref().unwrap();
validate::channel_id(&channel.id).unwrap();
assert!(!channel.name.is_empty());
if let Some(channel) = playlist.channel.as_ref() {
validate::channel_id(&channel.id).unwrap();
assert!(!channel.name.is_empty());
}
} else {
assert!(playlist.channel.is_none());
}