diff --git a/src/providers/xfree.rs b/src/providers/xfree.rs index b9e0456..60b2eb8 100644 --- a/src/providers/xfree.rs +++ b/src/providers/xfree.rs @@ -262,6 +262,12 @@ impl XfreeProvider { let uploaded_at = chrono::DateTime::parse_from_rfc3339(&upload_date) .map(|dt| dt.timestamp() as u64) .unwrap_or(0); + let aspect_ration = post + .get("media") + .and_then(|v| v.get("aspectRatio")) + .and_then(|v| v.as_str()) + .unwrap_or_default() + .to_string(); let video_item = VideoItem::new( id.to_string(), title, @@ -274,7 +280,8 @@ impl XfreeProvider { .preview(preview) .tags(tags) .uploader(uploader) - .uploaded_at(uploaded_at); + .uploaded_at(uploaded_at) + .aspect_ratio(aspect_ration); items.push(video_item); } return items;