Skip to content

Commit

Permalink
fix: clarity does not inherite from list to video
Browse files Browse the repository at this point in the history
  • Loading branch information
kingwingfly committed Feb 3, 2024
1 parent 449a4b8 commit 59e2fca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fav"
version = "0.1.3"
version = "0.1.4"
authors = ["Louis <[email protected]>"]
description = "Back up your favorite online resources with CLI."
license = "MIT"
Expand Down
5 changes: 3 additions & 2 deletions src/api/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ impl Meta {

async fn fetch_videos(&mut self) -> Result<()> {
info!("Fetching fave videos tracked");
for (list_id, count) in self
for (list_id, count, clarity) in self
.lists
.iter()
.filter(|list| list.track)
.map(|list| (list.id, list.media_count))
.map(|list| (list.id, list.media_count, list.clarity.unwrap()))
{
for page in 0..=count.saturating_sub(1) / 20 {
let url = reqwest::Url::parse_with_params(
Expand Down Expand Up @@ -111,6 +111,7 @@ impl Meta {
video.fav = true;
video.expired = video.attr != 0;
video.track = true;
video.clarity = clarity.into();
self.videos.push(video);
}
});
Expand Down

0 comments on commit 59e2fca

Please sign in to comment.