fix: reworked retry system

This commit is contained in:
ThetaDev 2023-05-12 17:19:56 +02:00
parent d128ca4214
commit a2bbc850a7
17 changed files with 273 additions and 121 deletions

View file

@ -314,7 +314,7 @@ impl MapResponse<UrlTarget> for response::ResolvedUrl {
.browse_endpoint
.ok_or(ExtractionError::InvalidData(Cow::Borrowed("No browse ID")))?;
let page_type = self
let target = self
.endpoint
.command_metadata
.map(|c| c.web_command_metadata.web_page_type)
@ -323,10 +323,11 @@ impl MapResponse<UrlTarget> for response::ResolvedUrl {
.browse_endpoint_context_supported_configs
.map(|c| c.browse_endpoint_context_music_config.page_type)
})
.and_then(|pt| pt.to_url_target(browse_endpoint.browse_id))
.ok_or(ExtractionError::InvalidData(Cow::Borrowed("No page type")))?;
Ok(MapResult {
c: page_type.to_url_target(browse_endpoint.browse_id),
c: target,
warnings: Vec::new(),
})
}