From e22a3f2d6d3e16edf8cce54cccb75ead444182f7 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 1 Dec 2025 16:07:45 +0000 Subject: [PATCH] prevent empty tags/formats --- src/videos.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/videos.rs b/src/videos.rs index bb92195..42658dc 100644 --- a/src/videos.rs +++ b/src/videos.rs @@ -129,6 +129,9 @@ impl VideoItem { } } pub fn tags(mut self, tags: Vec) -> Self { + if tags.is_empty(){ + return self; + } self.tags = Some(tags); self } @@ -157,6 +160,9 @@ impl VideoItem { self } pub fn formats(mut self, formats: Vec) -> Self { + if formats.is_empty(){ + return self; + } self.formats = Some(formats); self }