feat: add URL resolver

This commit is contained in:
ThetaDev 2022-10-16 01:40:52 +02:00
parent 2b70badd4e
commit b22f6995cc
22 changed files with 673 additions and 279 deletions

View file

@ -237,11 +237,10 @@ impl MapResponse<Channel<ChannelInfo>> for response::Channel {
links: meta
.primary_links
.into_iter()
.map(|l| {
(
l.title,
util::sanitize_yt_url(&l.navigation_endpoint.url_endpoint.url),
)
.filter_map(|l| {
l.navigation_endpoint
.url_endpoint
.map(|url| (l.title, util::sanitize_yt_url(&url.url)))
})
.collect(),
})