refactor!: change StreamFilter builder
tests: add album_no_year test
This commit is contained in:
parent
3970a4b9d9
commit
f526470b6a
4 changed files with 80 additions and 13 deletions
|
|
@ -60,12 +60,12 @@ async fn download_single_video(
|
|||
video_id
|
||||
))?;
|
||||
|
||||
let mut filter = StreamFilter::default();
|
||||
let mut filter = StreamFilter::new();
|
||||
if let Some(res) = resolution {
|
||||
if res == 0 {
|
||||
filter.no_video();
|
||||
filter = filter.no_video();
|
||||
} else {
|
||||
filter.video_max_res(res);
|
||||
filter = filter.video_max_res(res);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue