mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 04:02:00 -06:00
Fmt
This commit is contained in:
parent
e06e6b2b01
commit
3ae6fe4a1a
3 changed files with 6 additions and 4 deletions
|
|
@ -213,7 +213,8 @@ async fn get_format(
|
||||||
|
|
||||||
for single_format in single_formats {
|
for single_format in single_formats {
|
||||||
let stream = single_format.stream().await?;
|
let stream = single_format.stream().await?;
|
||||||
let Some((video, audio)) = variant_data_from_stream(&stream, &archive.resolution).await? else {
|
let Some((video, audio)) = variant_data_from_stream(&stream, &archive.resolution).await?
|
||||||
|
else {
|
||||||
if single_format.is_episode() {
|
if single_format.is_episode() {
|
||||||
bail!(
|
bail!(
|
||||||
"Resolution ({}) is not available for episode {} ({}) of {} season {}",
|
"Resolution ({}) is not available for episode {} ({}) of {} season {}",
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,8 @@ async fn get_format(
|
||||||
single_format: &SingleFormat,
|
single_format: &SingleFormat,
|
||||||
) -> Result<(DownloadFormat, Format)> {
|
) -> Result<(DownloadFormat, Format)> {
|
||||||
let stream = single_format.stream().await?;
|
let stream = single_format.stream().await?;
|
||||||
let Some((video, audio)) = variant_data_from_stream(&stream, &download.resolution).await? else {
|
let Some((video, audio)) = variant_data_from_stream(&stream, &download.resolution).await?
|
||||||
|
else {
|
||||||
if single_format.is_episode() {
|
if single_format.is_episode() {
|
||||||
bail!(
|
bail!(
|
||||||
"Resolution ({}) is not available for episode {} ({}) of {} season {}",
|
"Resolution ({}) is not available for episode {} ({}) of {} season {}",
|
||||||
|
|
|
||||||
|
|
@ -297,8 +297,8 @@ impl Iterator for SingleFormatCollectionIterator {
|
||||||
type Item = Vec<SingleFormat>;
|
type Item = Vec<SingleFormat>;
|
||||||
|
|
||||||
fn next(&mut self) -> Option<Self::Item> {
|
fn next(&mut self) -> Option<Self::Item> {
|
||||||
let Some((_, episodes)) = self.0.0.iter_mut().next() else {
|
let Some((_, episodes)) = self.0 .0.iter_mut().next() else {
|
||||||
return None
|
return None;
|
||||||
};
|
};
|
||||||
|
|
||||||
let value = episodes.pop_first().unwrap().1;
|
let value = episodes.pop_first().unwrap().1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue